1
0
mirror of synced 2025-01-18 06:21:40 +03:00

added template method call delegator

This commit is contained in:
zYne 2007-08-17 21:22:03 +00:00
parent ed8e90b8df
commit bcb31fc232

View File

@ -1476,6 +1476,16 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
}
return $this;
}
public function __call($method, $args)
{
foreach ($this->_table->getTemplates as $template) {
if (method_exists($template, $method)) {
return call_user_func_array(array($template, $method), $args);
}
}
throw new Doctrine_Record_Exception('Unknown method ' . $method);
}
/**
* used to delete node from tree - MUST BE USE TO DELETE RECORD IF TABLE ACTS AS TREE
*