Example #1
0
 /**
  * Constructor
  * @param ZController $a_controller
  */
 public function __construct(ZController &$a_controller = null)
 {
     parent::__construct();
     if ($this->m_controler) {
         $this->m_controler = $a_controller;
     }
 }
Example #2
0
 /**
  * Constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->m_models = array();
     $this->m_controllers = array();
     $this->m_library = array();
     $this->m_plugins = array();
 }
Example #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();
 }
Example #4
0
 /**
  * Construct
  */
 function __construct($a_route = null, $a_rules = array())
 {
     parent::__construct();
     $this->m_rules = array();
     if ($a_rules) {
         $this->setRules($a_rules);
     }
     $this->route($a_route);
 }
Example #5
0
 /**
  * Construct
  */
 public function __construct(ZObject &$a_parent = null, $a_name = null)
 {
     parent::__construct($a_parent, $a_name);
     $this->m_rules = array();
     $this->m_request = new ZRoute();
     $this->m_redirect = new ZRoute();
     $this->m_current = new ZRoute();
     $this->m_request = null;
 }
Example #6
0
 /**
  * Constructor
  * @param ZController $a_controller
  * @param string $a_view
  */
 public function __construct($a_view = null, $a_data = null)
 {
     parent::__construct();
     $this->m_data = new ZRegistry();
     if ($a_view) {
         $this->setView($a_view);
     }
     if ($a_data) {
         $this->m_data->setDataRef($a_data);
     }
 }
Example #7
0
 public function __construct(ZObject &$parent = null, $a_name = null)
 {
     parent::__construct($parent, $a_name);
     $this->m_config = new ZConfig();
     $this->m_flag = array();
     $this->setLoader(new ZLoader($this));
     $this->setLanguage(new ZLanguage($this));
     $this->setRegistry(new ZRegistry());
     $this->setMode(ZApplication::MODE_NORMAL);
     $this->setDispatcher(Zoombi::getDispatcher($this));
     $this->setPluginManager(new ZPluginManager($this));
 }
Example #8
0
 /**
  * Contructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->m_path = null;
 }
 public function __construct(ZModule &$a_parent = null, $a_name = null)
 {
     parent::__construct($a_parent, $a_name);
 }
Example #10
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);
     if (isset($this->action)) {
         $actions = array();
         switch (gettype($this->action)) {
             case 'string':
                 $actions = explode(' ', $this->action);
                 break;
             case 'array':
                 $actions =& $this->action;
                 break;
         }
         foreach ($actions as $k => $v) {
             $key = trim((string) $k);
             $name = trim((string) $v);
             if (empty($name)) {
                 continue;
             }
             if (empty($key) or is_numeric($key)) {
                 $key = $name;
             }
             try {
                 $action = $this->load->action($name);
                 $action->setController($this);
                 $this->m_actions[$key] =& $action;
             } catch (ZActionException $e) {
                 if ($this->application->isMode(ZApplication::MODE_DEBUG)) {
                     throw new ZControllerException($e->getMessage(), ZControllerException::EXC_MODEL);
                 }
             }
         }
         unset($this->actions);
     }
     if (isset($this->model)) {
         $models = array();
         switch (gettype($this->model)) {
             default:
                 throw new ZControllerException("Controller '{$this->getName()}':  has wrong model type.", ZControllerException::EXC_MODEL);
                 break;
             case 'string':
                 $models = explode(' ', $this->model);
                 break;
             case 'array':
                 $models =& $this->model;
                 break;
         }
         foreach ($models as $m) {
             $name = trim((string) $m);
             if (empty($name)) {
                 continue;
             }
             try {
                 $model = $this->load->model($name);
                 $model->setController($this);
                 $this->m_models[$name] =& $model;
             } catch (ZModelException $e) {
                 if ($this->application->isMode(ZApplication::MODE_DEBUG)) {
                     throw new ZControllerException($e->getMessage(), ZControllerException::EXC_MODEL);
                 }
             }
         }
         unset($this->model);
     }
     if (isset($this->helper)) {
         $helpers = array();
         switch (gettype($this->helper)) {
             default:
                 throw new ZControllerException("Controller '{$this->getName()}':  has wrong helper type.", ZControllerException::EXC_MODEL);
                 break;
             case 'string':
                 $helpers = explode(' ', trim($this->helper));
                 break;
             case 'array':
                 $helpers =& $this->helper;
                 break;
         }
         foreach ($helpers as $h) {
             $name = trim((string) $h);
             if (empty($name)) {
                 continue;
             }
             try {
                 $this->load->helper($name);
             } catch (ZHelperException $e) {
                 if ($this->application->isMode(ZApplication::MODE_DEBUG)) {
                     throw new ZControllerException($e->getMessage(), ZControllerException::EXC_HELPER);
                 }
             }
         }
         unset($this->helper);
     }
 }
Example #11
0
 /**
  * Constructor
  * @param ZObject $a_parent
  * @param string $a_name
  */
 public function __construct(ZObject &$a_parent = null, $a_name = null)
 {
     parent::__construct($a_parent, $a_name);
     $this->m_listeners = array();
     $this->m_processor = array();
 }
 /**
  * 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();
 }
 /**
  * Constructor
  * @param ZObject $a_parent
  * @param string $a_name
  */
 public function __construct(ZObject &$a_parent = null, $a_name = null)
 {
     parent::__construct($a_parent, $a_name);
 }
Example #14
0
 public function __construct($a_type, $a_mime)
 {
     parent::__construct();
     $this->setType($a_type)->setMime($a_mime);
 }
Example #15
0
 /**
  * Constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->m_times = array();
     $this->m_mem = array();
 }
Example #16
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->m_config = new ZConfig();
     ZProfiler::start('Application');
     $this->m_errors = array();
     $this->m_except = array();
     $this->m_flag = array();
     $this->m_database = null;
     //$this->setLanguage( new ZLanguage() );
     $this->setRegistry(new ZRegistry());
     $this->setMode(ZApplication::MODE_NORMAL);
     $this->setRouter(new ZRouter());
     $this->setDispatcher(Zoombi::getDispatcher());
     $this->setPluginManager(new ZPluginManager());
 }