public function checkActivationStatus()
    {
        if (true == $this->builder->conf['restful']) {
            $path = ltrim(parse_url($this->url(), PHP_URL_PATH), '/');
            $rpath = ltrim(parse_url(Request::path(), PHP_URL_PATH), '/');

            if ($this->builder->conf['rest_base']) {
                $base = (is_array($this->builder->conf['rest_base'])) ? implode('|', $this->builder->conf['rest_base']) : $this->builder->conf['rest_base'];

                list($path, $rpath) = preg_replace('@^('.$base.')/@', '', [$path, $rpath], 1);
            }

            if (preg_match("@^{$path}(/.+)?\z@", $rpath)) {
                $this->activate();
            }
        } else {
            // We should consider a $strict config. If $strict then only match against fullURL.
            if ($this->url() == Request::url() || $this->url() == Request::fullUrl()) {
                $this->activate();
            }
        }
    }
public function checkActivationStatus()
    {
        if (true == $this->builder->conf['restful']) {
            $path = ltrim(parse_url($this->url(), PHP_URL_PATH), '/');
            $rpath = ltrim(parse_url(Request::path(), PHP_URL_PATH), '/');

            if ($this->builder->conf['rest_base']) {
                $base = (is_array($this->builder->conf['rest_base'])) ? implode('|', $this->builder->conf['rest_base']) : $this->builder->conf['rest_base'];

                list($path, $rpath) = preg_replace('@^('.$base.')/@', '', [$path, $rpath], 1);
            }

            if (preg_match("@^{$path}(/.+)?\z@", $rpath)) {
                $this->activate();
            }
        } else {
            // We should consider a $strict config. If $strict then only match against fullURL.
            if ($this->url() == Request::url() || $this->url() == Request::fullUrl()) {
                $this->activate();
            }
        }
    }
public function checkActivationStatus ( ) { if ( true == $ this -> builder -> conf [ 'restful' ] ) { $ path = ltrim ( parse_url ( $ this -> url ( ) , PHP_URL_PATH ) , '/' ) ; $ rpath = ltrim ( parse_url ( Request :: path ( ) , PHP_URL_PATH ) , '/' ) ; if ( $ this -> builder -> conf [ 'rest_base' ] ) { $ base = ( is_array ( $ this -> builder -> conf [ 'rest_base' ] ) ) ? implode ( '|' , $ this -> builder -> conf [ 'rest_base' ] ) : $ this -> builder -> conf [ 'rest_base' ] ; list ( $ path , $ rpath ) = preg_replace ( '@^(' . $ base . ')/@' , '' , [ $ path , $ rpath ] , 1 ) ; } if ( preg_match ( "@^{$path}(/.+)?\z@" , $ rpath ) ) { $ this -> activate ( ) ; } } else { // We should consider a $strict config. If $strict then only match against fullURL. if ( $ this -> url ( ) == Request :: url ( ) || $ this -> url ( ) == Request :: fullUrl ( ) ) { $ this -> activate ( ) ; } } }
Decide if the item should be active.
Decide if the item should be active .