1
0
mirror of https://github.com/dg/dibi.git synced 2025-09-09 22:00:51 +02:00

- DibiResult::fetchAssoc() respects 'resultObject' configuration option

- DibiResult::dump() forces arrays
- updated Nette::Object
This commit is contained in:
David Grudl
2008-09-03 22:47:49 +00:00
parent d4f9e0378f
commit 52d2ecf5b0
2 changed files with 28 additions and 13 deletions

View File

@@ -108,14 +108,22 @@ abstract class Object
}
// event functionality
if (property_exists($class, $name) && preg_match('#^on[A-Z]#', $name)) {
$list = $this->$name;
if (is_array($list) || $list instanceof Traversable) {
foreach ($list as $handler) {
call_user_func_array($handler, $args);
if (preg_match('#^on[A-Z]#', $name)) {
$rp = new ReflectionProperty($class, $name);
if ($rp->isPublic() && !$rp->isStatic()) {
$list = $this->$name;
if (is_array($list) || $list instanceof Traversable) {
foreach ($list as $handler) {
/**/if (is_object($handler)) {
call_user_func_array(array($handler, '__invoke'), $args);
} else /**/{
call_user_func_array($handler, $args);
}
}
}
return;
}
return;
}
// extension methods