svn: /phpdoc/en/trunk/reference/ errorfunc/functions/set-error-handler.xml errorfunc/functions/set-exception-handler.xml
outcontrol/functions/ob-start.xml pcre/functions/preg-replace-callback.xml

From: Date: Thu, 16 May 2013 18:24:33 +0000
Subject: svn: /phpdoc/en/trunk/reference/ errorfunc/functions/set-error-handler.xml errorfunc/functions/set-exception-handler.xml
outcontrol/functions/ob-start.xml pcre/functions/preg-replace-callback.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-11264@lists.php.net to get a copy of this message
vrana Thu, 16 May 2013 18:24:33 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=330240 Log: Document callback signatures Changed paths: U phpdoc/en/trunk/reference/errorfunc/functions/set-error-handler.xml U phpdoc/en/trunk/reference/errorfunc/functions/set-exception-handler.xml U phpdoc/en/trunk/reference/outcontrol/functions/ob-start.xml U phpdoc/en/trunk/reference/pcre/functions/preg-replace-callback.xml Modified: phpdoc/en/trunk/reference/errorfunc/functions/set-error-handler.xml =================================================================== --- phpdoc/en/trunk/reference/errorfunc/functions/set-error-handler.xml 2013-05-16 10:59:51 UTC (rev 330239) +++ phpdoc/en/trunk/reference/errorfunc/functions/set-error-handler.xml 2013-05-16 18:24:33 UTC (rev 330240) @@ -75,7 +75,7 @@ </para> <para> <methodsynopsis> - <methodname><replaceable>handler</replaceable></methodname> + <type>bool</type><methodname><replaceable>handler</replaceable></methodname> <methodparam><type>int</type><parameter>errno</parameter></methodparam> <methodparam><type>string</type><parameter>errstr</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>errfile</parameter></methodparam> Modified: phpdoc/en/trunk/reference/errorfunc/functions/set-exception-handler.xml =================================================================== --- phpdoc/en/trunk/reference/errorfunc/functions/set-exception-handler.xml 2013-05-16 10:59:51 UTC (rev 330239) +++ phpdoc/en/trunk/reference/errorfunc/functions/set-exception-handler.xml 2013-05-16 18:24:33 UTC (rev 330240) @@ -33,8 +33,14 @@ This function must be defined before calling <function>set_exception_handler</function>. This handler function needs to accept one parameter, which will be the exception object that - was thrown. + was thrown. This is the handler signature: </para> + <para> + <methodsynopsis> + <type>void</type><methodname><replaceable>handler</replaceable></methodname> + <methodparam><type>Exception</type><parameter>$ex</parameter></methodparam> + </methodsynopsis> + </para> <note> <para> &null; may be passed instead, to reset this handler to its Modified: phpdoc/en/trunk/reference/outcontrol/functions/ob-start.xml =================================================================== --- phpdoc/en/trunk/reference/outcontrol/functions/ob-start.xml 2013-05-16 10:59:51 UTC (rev 330239) +++ phpdoc/en/trunk/reference/outcontrol/functions/ob-start.xml 2013-05-16 18:24:33 UTC (rev 330240) @@ -65,11 +65,32 @@ return a new output buffer as a result, which will be sent to the browser. If the <parameter>output_callback</parameter> is not a callable function, this function will return &false;. + This is the callback signature: </para> <para> - If the callback function has two parameters, the second parameter is - filled with a bit-field consisting of - <constant>PHP_OUTPUT_HANDLER_*</constant> constants. + <methodsynopsis> + <type>bool</type><methodname><replaceable>handler</replaceable></methodname> + <methodparam><type>string</type><parameter>buffer</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>phase</parameter></methodparam> + </methodsynopsis> + <variablelist> + <varlistentry> + <term><parameter>buffer</parameter></term> + <listitem> + <simpara> + Contents of the output buffer. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>phase</parameter></term> + <listitem> + <simpara> + Bitmask of <constant>PHP_OUTPUT_HANDLER_*</constant> constants. + </simpara> + </listitem> + </varlistentry> + </variablelist> </para> <para> If <parameter>output_callback</parameter> returns &false; original Modified: phpdoc/en/trunk/reference/pcre/functions/preg-replace-callback.xml =================================================================== --- phpdoc/en/trunk/reference/pcre/functions/preg-replace-callback.xml 2013-05-16 10:59:51 UTC (rev 330239) +++ phpdoc/en/trunk/reference/pcre/functions/preg-replace-callback.xml 2013-05-16 18:24:33 UTC (rev 330240) @@ -43,9 +43,15 @@ <para> A callback that will be called and passed an array of matched elements in the <parameter>subject</parameter> string. The callback should - return the replacement string. + return the replacement string. This is the callback signature: </para> <para> + <methodsynopsis> + <type>string</type><methodname><replaceable>handler</replaceable></methodname> + <methodparam><type>array</type><parameter>matches</parameter></methodparam> + </methodsynopsis> + </para> + <para> You'll often need the <parameter>callback</parameter> function for a <function>preg_replace_callback</function> in just one place. In this case you can use an

« previous php.doc.cvs (#11264) next »