protected function execute($callback, $url, $method) { $method = strtoupper($method); $params = $url->params; $callback = Gongo_Fn::before($callback, Gongo_Fn::quote($this)->setSessionValue); $urlMatch = $this->factory->getObj('Gongo_App_Url_Router', array('-mountPoint' => $url->options->mountPoint)); $this->afterInitUrl($urlMatch); foreach (array('around', 'before', 'after') as $kind) { $callback = $this->setFilterCallback($kind, $callback, $urlMatch); } $this->attach('args', array('Gongo_Bean_ArrayWrapper', $params)); return call_user_func_array($callback, $params); }
public function attach($mName, $mClass = null) { if (is_array($mName)) { $sClass = array_shift($mName); if (property_exists($this, $sClass)) { unset($this->{$sClass}); } $this->components[$sClass] = Gongo_Fn::quote($this->factory)->makeObj($sClass, $mName); return $this; } if (is_array($mClass)) { $sClass = array_shift($mClass); } else { $sClass = is_null($mClass) ? $mName : $mClass; } if (property_exists($this, $mName)) { unset($this->{$mName}); } if (is_array($mClass)) { $this->components[$mName] = Gongo_Fn::quote($this->factory)->makeObj($sClass, $mClass); } else { $this->components[$mName] = Gongo_Fn::quote($this->factory)->getObj($sClass); } return $this; }
function quote($obj) { return Gongo_Fn::quote($obj); }
function setter($property) { return Gongo_Fn::quote($this)->setProperty($property); }