public function __call($method, $arguments)
{
$event = $this->dispatcher->notifyUntil(new sfEvent($this, 'context.method_not_found', array('method' => $method, 'arguments' => $arguments)));
if (!$event->isProcessed()) {
$verb = substr($method, 0, 3);
// get | set
$factory = strtolower(substr($method, 3));
// factory name
if ('get' == $verb && $this->has($factory)) {
return $this->factories[$factory];
} else {
if ('set' == $verb && isset($arguments[0])) {
return $this->set($factory, $arguments[0]);
}
}
throw new sfException(sprintf('Call to undefined method %s::%s.', get_class($this), $method));
}
return $event->getReturnValue();
}