コード例 #1
0
ファイル: App.php プロジェクト: no22/gongo
 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);
 }
コード例 #2
0
ファイル: Container.php プロジェクト: no22/gongo
 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;
 }
コード例 #3
0
ファイル: Autoload.php プロジェクト: no22/gongo
 function quote($obj)
 {
     return Gongo_Fn::quote($obj);
 }
コード例 #4
0
ファイル: Property.php プロジェクト: no22/gongo
 function setter($property)
 {
     return Gongo_Fn::quote($this)->setProperty($property);
 }