BcBaserHelper::__construct PHP Method

__construct() public method

コンストラクタ
public __construct ( View $View, array $settings = [] )
$View View ビュークラス
$settings array ヘルパ設定値(BcBaserHelper では利用していない)
    public function __construct(View $View, $settings = array())
    {
        parent::__construct($View, $settings);
        // モデルクラスをセット
        // 一度初期化した後に再利用し、処理速度を向上する為にコンストラクタでセットしておく
        if ($this->_View && BC_INSTALLED && !Configure::read('BcRequest.isUpdater') && !Configure::read('BcRequest.isMaintenance')) {
            // DBに接続できない場合、CakePHPのエラーメッセージが表示されてしまう為、 try を利用
            try {
                $this->_Permission = ClassRegistry::init('Permission');
                $this->_Page = ClassRegistry::init('Page');
            } catch (Exception $ex) {
            }
        }
        // サイト基本設定データをセット
        if (BC_INSTALLED || isConsole()) {
            $this->siteConfig = $this->_View->get('siteConfig', array());
        }
        // プラグインのBaserヘルパを初期化
        if (BC_INSTALLED && !Configure::read('BcRequest.isUpdater') && !Configure::read('BcRequest.isMaintenance')) {
            $this->_initPluginBasers();
        }
    }