mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
added example and documentated using an object->method as the callback
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@132263 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
02ba4eee1b
commit
8af4dcf928
1 changed files with 21 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.register-tick-function">
|
||||
<refnamediv>
|
||||
|
@ -19,7 +19,26 @@
|
|||
Registers the function named by <parameter>func</parameter> to be
|
||||
executed when a <link
|
||||
linkend="control-structures.declare">tick</link> is
|
||||
called.</simpara>
|
||||
called.
|
||||
</simpara>
|
||||
<simpara>
|
||||
You may also pass an array consisting of an object and a method as the <parameter>func</parameter>
|
||||
</simpara>
|
||||
<example>
|
||||
<title><function>register_tick_function</function> Example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// using a function as the callback
|
||||
register_tick_function('myFunction',TRUE);
|
||||
|
||||
// using an object->method
|
||||
$object = new myClass();
|
||||
register_tick_function(array(&$object,'myMethod'),TRUE);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue