note 118251 added to function.override-function

From: Date: Tue, 03 Nov 2015 10:37:28 +0000
Subject: note 118251 added to function.override-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-204077@lists.php.net to get a copy of this message
Maybe it's better to use overwritten function inside the override to code something like this : <?php rename_function('myFunction','original_myFunction'); override_function('myFunction','$arg,…,$argN','return override_myFunction($arg,…,$argN);'); ?> You may then give somehow "inheritance" to override_myFunction … As a parent : <?php function override_myFunction($arg,…,$argN) { $result=original_myFunction($arg,…,$argN)); /* CODE that manipulates the result */ return $result; } ?> As a child : <?php function override_myFunction($arg,…,$argN) { /* CODE that manipulates the arguments */ return original_myFunction($arg,…,$argN)); } ?> ---- Server IP: 72.52.91.14 Probable Submitter: 2001:7e8:c093:e101:22c9:d0ff:fec3:415d ---- Manual Page -- http://php.net/manual/en/function.override-function.php Edit -- https://master.php.net/note/edit/118251 Del: integrated -- https://master.php.net/note/delete/118251/integrated Del: useless -- https://master.php.net/note/delete/118251/useless Del: bad code -- https://master.php.net/note/delete/118251/bad+code Del: spam -- https://master.php.net/note/delete/118251/spam Del: non-english -- https://master.php.net/note/delete/118251/non-english Del: in docs -- https://master.php.net/note/delete/118251/in+docs Del: other reasons-- https://master.php.net/note/delete/118251 Reject -- https://master.php.net/note/reject/118251 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204077) next »