src/Component.php
private function registerAssets()
    {
        if ($this->jsNotifier === false) {
            return;
        }

        if (!Yii::$app instanceof \yii\web\Application) {
            return;
        }

        try {
            $view = Yii::$app->getView();
            RavenAsset::register($view);
            $view->registerJs('Raven.config(' . Json::encode($this->publicDsn) . ', ' . Json::encode($this->jsOptions) . ').install();', View::POS_HEAD);
        } catch (Exception $e) {
            // initialize Sentry component even if unable to register the assets
            Yii::error($e->getMessage());
        }
    }
private function registerAssets()
    {
        if ($this->jsNotifier === false) {
            return;
        }

        if (!Yii::$app instanceof \yii\web\Application) {
            return;
        }

        try {
            $view = Yii::$app->getView();
            RavenAsset::register($view);
            $view->registerJs('Raven.config(' . Json::encode($this->publicDsn) . ', ' . Json::encode($this->jsOptions) . ').install();', View::POS_HEAD);
        } catch (Exception $e) {
            // initialize Sentry component even if unable to register the assets
            Yii::error($e->getMessage());
        }
    }
private function registerAssets ( ) { if ( $ this -> jsNotifier === false ) { return ; } if ( ! Yii :: $ app instanceof \ yii \ web \ Application ) { return ; } try { $ view = Yii :: $ app -> getView ( ) ; RavenAsset :: register ( $ view ) ; $ view -> registerJs ( 'Raven.config(' . Json :: encode ( $ this -> publicDsn ) . ', ' . Json :: encode ( $ this -> jsOptions ) . ').install();' , View :: POS_HEAD ) ; } catch ( Exception $ e ) { // initialize Sentry component even if unable to register the assets Yii :: error ( $ e -> getMessage ( ) ) ; } }
Registers RavenJS if publicDsn exists
Registers RavenJS if publicDsn exists