From: <var...@us...> - 2014-10-09 14:08:56
|
Revision: 9232 http://sourceforge.net/p/phpwiki/code/9232 Author: vargenau Date: 2014-10-09 14:08:52 +0000 (Thu, 09 Oct 2014) Log Message: ----------- Add return Modified Paths: -------------- trunk/lib/WikiCallback.php Modified: trunk/lib/WikiCallback.php =================================================================== --- trunk/lib/WikiCallback.php 2014-10-09 14:08:01 UTC (rev 9231) +++ trunk/lib/WikiCallback.php 2014-10-09 14:08:52 UTC (rev 9232) @@ -34,6 +34,7 @@ return new WikiMethodCb($object, $method); } trigger_error("WikiCallback::new: bad arg", E_USER_ERROR); + return null; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-02 13:07:10
|
Revision: 9401 http://sourceforge.net/p/phpwiki/code/9401 Author: vargenau Date: 2014-12-02 13:07:03 +0000 (Tue, 02 Dec 2014) Log Message: ----------- Remove unused function callback Modified Paths: -------------- trunk/lib/WikiCallback.php Modified: trunk/lib/WikiCallback.php =================================================================== --- trunk/lib/WikiCallback.php 2014-12-02 12:55:31 UTC (rev 9400) +++ trunk/lib/WikiCallback.php 2014-12-02 13:07:03 UTC (rev 9401) @@ -13,29 +13,6 @@ abstract class WikiCallback { /** - * Convert from Pear-style callback specification to a WikiCallback. - * - * @param $pearCb mixed - * For a global function callback, $pearCb should be a string containing - * the name of the function. - * For an object method callback, $pearCb should be a array of length two: - * the first element should contain (a reference to) the object, the second - * element should be a string containing the name of the method to be invoked. - * @return object Returns the appropriate subclass of WikiCallback. - */ - static public function callback($pearCb) - { - if (is_string($pearCb)) - return new WikiFunctionCb($pearCb); - else if (is_array($pearCb)) { - list($object, $method) = $handler; - return new WikiMethodCb($object, $method); - } - trigger_error("WikiCallback::new: bad arg", E_USER_ERROR); - return null; - } - - /** * Call callback. * * @param ? mixed This method takes a variable number of arguments (zero or more). @@ -73,7 +50,7 @@ extends WikiCallback { /** - * @param $functionName string Name of global function to call. + * @param string $functionName Name of global function to call. */ public function __construct($functionName) { @@ -98,8 +75,8 @@ extends WikiCallback { /** - * @param $object object Object on which to invoke method. - * @param $methodName string Name of method to call. + * @param object $object Object on which to invoke method. + * @param string $methodName Name of method to call. */ function __construct(&$object, $methodName) { @@ -126,8 +103,8 @@ extends WikiCallback { /** - * @param $args string Argument declarations - * @param $code string Function body + * @param string $args Argument declarations + * @param string $code Function body * @see create_function(). */ function __construct($args, $code) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2016-06-16 15:50:48
|
Revision: 9856 http://sourceforge.net/p/phpwiki/code/9856 Author: vargenau Date: 2016-06-16 15:50:45 +0000 (Thu, 16 Jun 2016) Log Message: ----------- No public needed for function __construct Modified Paths: -------------- trunk/lib/WikiCallback.php Modified: trunk/lib/WikiCallback.php =================================================================== --- trunk/lib/WikiCallback.php 2016-05-25 16:21:23 UTC (rev 9855) +++ trunk/lib/WikiCallback.php 2016-06-16 15:50:45 UTC (rev 9856) @@ -52,7 +52,7 @@ /** * @param string $functionName Name of global function to call. */ - public function __construct($functionName) + function __construct($functionName) { $this->functionName = $functionName; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-08-03 11:09:55
|
Revision: 10413 http://sourceforge.net/p/phpwiki/code/10413 Author: vargenau Date: 2021-08-03 11:09:52 +0000 (Tue, 03 Aug 2021) Log Message: ----------- Remove unused class WikiAnonymousCb Modified Paths: -------------- trunk/lib/WikiCallback.php Modified: trunk/lib/WikiCallback.php =================================================================== --- trunk/lib/WikiCallback.php 2021-07-30 16:48:02 UTC (rev 10412) +++ trunk/lib/WikiCallback.php 2021-08-03 11:09:52 UTC (rev 10413) @@ -118,31 +118,3 @@ return array($this->object, $this->methodName); } } - -/** - * Anonymous function callback. - */ -class WikiAnonymousCb - extends WikiCallback -{ - /** - * @param string $args Argument declarations - * @param string $code Function body - * @see create_function(). - */ - function __construct($args, $code) - { - $this->function = create_function($args, $code); - } - - function call_array($args) - { - return call_user_func_array($this->function, $args); - } - - function toPearCb() - { - trigger_error("Can't convert WikiAnonymousCb to Pear callback", - E_USER_ERROR); - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |