|
@@ 973-979 (lines=7) @@
|
| 970 |
|
public function extend($method, &$a1=null, &$a2=null, &$a3=null, &$a4=null, &$a5=null, &$a6=null, &$a7=null) { |
| 971 |
|
$values = array(); |
| 972 |
|
|
| 973 |
|
if(!empty($this->beforeExtendCallbacks[$method])) { |
| 974 |
|
foreach(array_reverse($this->beforeExtendCallbacks[$method]) as $callback) { |
| 975 |
|
$value = call_user_func_array($callback, array(&$a1, &$a2, &$a3, &$a4, &$a5, &$a6, &$a7)); |
| 976 |
|
if($value !== null) $values[] = $value; |
| 977 |
|
} |
| 978 |
|
$this->beforeExtendCallbacks[$method] = array(); |
| 979 |
|
} |
| 980 |
|
|
| 981 |
|
if($this->extension_instances) foreach($this->extension_instances as $instance) { |
| 982 |
|
if(method_exists($instance, $method)) { |
|
@@ 990-996 (lines=7) @@
|
| 987 |
|
} |
| 988 |
|
} |
| 989 |
|
|
| 990 |
|
if(!empty($this->afterExtendCallbacks[$method])) { |
| 991 |
|
foreach(array_reverse($this->afterExtendCallbacks[$method]) as $callback) { |
| 992 |
|
$value = call_user_func_array($callback, array(&$a1, &$a2, &$a3, &$a4, &$a5, &$a6, &$a7)); |
| 993 |
|
if($value !== null) $values[] = $value; |
| 994 |
|
} |
| 995 |
|
$this->afterExtendCallbacks[$method] = array(); |
| 996 |
|
} |
| 997 |
|
|
| 998 |
|
return $values; |
| 999 |
|
} |