/** * Method __construct * @author Bruno Oliveira <*****@*****.**> * @access public * @param string|array $db */ public function __construct($db = null) { $configs = App::getDBConfig(); if (is_null($db)) { $dataBaseMain = App::dbMain(); $dataBaseMain = !is_null($dataBaseMain) ? $dataBaseMain : 'Main'; $this->open($configs[$dataBaseMain]); } elseif (is_array($db)) { $this->open($db); } else { $this->open($configs[$db]); } }
/** * Method __construct * @author Bruno Oliveira <*****@*****.**> */ public function __construct() { $dirTpl = isset($this->dirTl) ? $this->dirTpl : App::appDirTpl(); parent::__construct(); $this->template_dir = $dirTpl . ''; $this->compile_dir = $dirTpl . 'tpl_tmp/'; $this->config_dir = $dirTpl . 'tpl_config/'; $this->cache_dir = $dirTpl . 'tpl_cache/'; $this->left_delimiter = '[{'; $this->right_delimiter = '}]'; $this->caching = 0; $this->compile_check = true; $this->debugging = false; $this->assign('appConfig', App::getConfig()); }
/** * Method addRestfulServer * Add restful server * @author Bruno Oliveira <*****@*****.**> * @param string $method * @param string $url * @param string $methodClass */ protected function addRestfulServer($method, $url, $methodClass) { App::getServerRestful()->server($method, $url, array($this, $methodClass)); }