public function init()
    {
        parent::init();

        if ($this->normalizer !== false) {
            $this->normalizer = Yii::createObject($this->normalizer);
            if (!$this->normalizer instanceof UrlNormalizer) {
                throw new InvalidConfigException('`' . get_class($this) . '::normalizer` should be an instance of `' . UrlNormalizer::className() . '` or its DI compatible configuration.');
            }
        }

        if (!$this->enablePrettyUrl) {
            return;
        }
        if (is_string($this->cache)) {
            $this->cache = Yii::$app->get($this->cache, false);
        }
        if (empty($this->rules)) {
            return;
        }
        $this->rules = $this->buildRules($this->rules);
    }
public function init()
    {
        parent::init();

        if ($this->normalizer !== false) {
            $this->normalizer = Yii::createObject($this->normalizer);
            if (!$this->normalizer instanceof UrlNormalizer) {
                throw new InvalidConfigException('`' . get_class($this) . '::normalizer` should be an instance of `' . UrlNormalizer::className() . '` or its DI compatible configuration.');
            }
        }

        if (!$this->enablePrettyUrl) {
            return;
        }
        if (is_string($this->cache)) {
            $this->cache = Yii::$app->get($this->cache, false);
        }
        if (empty($this->rules)) {
            return;
        }
        $this->rules = $this->buildRules($this->rules);
    }
public function init ( ) { parent :: init ( ) ; if ( $ this -> normalizer !== false ) { $ this -> normalizer = Yii :: createObject ( $ this -> normalizer ) ; if ( ! $ this -> normalizer instanceof UrlNormalizer ) { throw new InvalidConfigException ( '`' . get_class ( $ this ) . '::normalizer` should be an instance of `' . UrlNormalizer :: className ( ) . '` or its DI compatible configuration.' ) ; } } if ( ! $ this -> enablePrettyUrl ) { return ; } if ( is_string ( $ this -> cache ) ) { $ this -> cache = Yii :: $ app -> get ( $ this -> cache , false ) ; } if ( empty ( $ this -> rules ) ) { return ; } $ this -> rules = $ this -> buildRules ( $ this -> rules ) ; }
Initializes UrlManager.
Initializes UrlManager .