Commit bcb31fc2 authored by zYne's avatar zYne

added template method call delegator

parent ed8e90b8
......@@ -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
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment