Beispiel #1
0
 function call($name, array $arguments, &$ref)
 {
     if (method_exists(get_class($this), $name)) {
         $arguments[] =& $ref;
         return parent::call($name, $arguments, $this);
     }
     return null;
 }
Beispiel #2
0
 function call($name, array $arguments, &$ref)
 {
     if (method_exists($ref, $name)) {
         $prioName = 'pre' . $name;
         if (method_exists($ref, $prioName) && parent::call($prioName, $arguments, $ref) == false) {
             return null;
         }
         $results = parent::call($name, $arguments, $ref);
         $postName = 'post' . $name;
         if (method_exists($ref, $postName)) {
             return parent::call($postName, $arguments, $ref);
         }
     }
     if (!is_null($results)) {
         return $results;
     }
     return null;
 }