Пример #1
0
 /**
  * @param string $sysPath
  * @return \PHPj\Core\Core
  */
 public static function init($sysPath)
 {
     Config::set(array('system_path' => $sysPath));
     self::loadConfigs();
     Log::init();
     self::setEncoding('UTF-8');
     return new self();
 }
Пример #2
0
 public function __construct(Request $request)
 {
     try {
         $this->url = $request->getUrl();
         $this->method = $request->getMethod();
         $this->initModule();
         Config::set($this->loadConfig());
         $this->handler();
         Config::set($this->getControlParams());
         $this->loadBootstrap();
         $this->loadController();
         $this->callAction();
     } catch (\Exception $e) {
         $this->getError($e->getMessage());
     }
 }