__init() public method

初始化环境
public __init ( ) : null
return null
コード例 #1
0
ファイル: Controller.php プロジェクト: abc1225/test2
 function __construct(\Swoole $swoole)
 {
     $this->swoole = $swoole;
     $this->model = $swoole->model;
     $this->config = $swoole->config;
     $this->template_dir = \Swoole::$app_path . '/templates/';
     if (!defined('TPL_PATH')) {
         define('TPL_PATH', $this->template_dir);
     }
     if ($this->if_filter) {
         Filter::request();
     }
     $swoole->__init();
 }