예제 #1
0
 /**
  * Object setter
  * @param string $a_name
  * @param mixed $a_value
  * @return mixed
  */
 public function __set($a_name, $a_value)
 {
     if (!$this->m_this) {
         parent::__set($a_name, $a_value);
     }
     $this->m_this->{$a_name} = $a_value;
 }
예제 #2
0
 /**
  * Constructor
  * @param ZObject $a_parent
  * @param string $a_name
  */
 function __construct(ZObject &$a_parent = null, $a_name = null)
 {
     parent::__construct($a_parent, $a_name);
     $this->m_plugins = array();
     if ($a_parent) {
         $this->setTarget($a_parent->getDispatcher());
     }
 }
예제 #3
0
 /**
  * Constructor
  */
 function __construct(ZObject &$a_parent = null, $a_name = null)
 {
     parent::__construct($a_parent, $a_name);
     $this->m_models = array();
     $this->m_controllers = array();
     $this->m_library = array();
     $this->m_plugins = array();
     $this->m_modules = array();
 }
예제 #4
0
 /**
  * Get property
  * @param string $a_property
  * @return mixed
  */
 public function &__get($a_property)
 {
     if ($this->hasModel($a_property)) {
         return $this->getModel($a_property);
     }
     return parent::__get($a_property);
 }
예제 #5
0
 /**
  * Module constructor
  * @param ZObject $parent
  * @param string $a_name
  */
 public function __construct(ZObject &$a_parent = null, $a_name = null)
 {
     parent::__construct($a_parent, $a_name);
     $this->m_stack_iterator = 0;
     $this->m_flag = array();
     $this->m_route_args = array();
     $this->m_stack = array();
     $this->setAcl(new ZAcl());
     $this->setMode(self::MODE_NORMAL);
     if ($a_parent instanceof ZModule) {
         $this->setMode($a_parent->getMode());
         $this->setConfig($a_parent->getConfig());
     }
     /*$d = new ZDispatcher($this, $a_name . '_dispatcher');
     		$this->setDispatcher($d);*/
     $this->m_plugin_mgr = new ZPluginManager($this);
 }
예제 #6
0
 /**
  * Get property
  * @param string $a_property
  * @return mixed
  */
 public function &__get($a_property)
 {
     $v = null;
     if ($this->hasModel($a_property)) {
         $v = $this->getModel($a_property);
         return $v;
     }
     $v = parent::__get($a_property);
     return $v;
 }
예제 #7
0
 public function &__get($a_property)
 {
     switch ($a_property) {
         case 'router':
             return $this->getRouter();
         case 'route':
             return $this->getRoute();
         case 'registry':
             return $this->getRegistry();
         case 'config':
             return $this->getConfig();
         case 'language':
             return $this->getLanguage();
         case 'load':
             return $this->getLoader();
         case 'acl':
             return $this->getAcl();
     }
     return parent::__get($a_property);
 }