public function is($url = '', $true = true, $false = "")
    {
        if (is_array($url) && isset($url[0]) && is_int($url[0]) && $url[0] <= count($this->chunks)) {
            $chunk = isset($url[1]) && is_string($url[1]) ? $this->clean($url[1]) : '';

            return $this->clean($this->chunks[($url[0] - 1)]) === $chunk ? $true : $false;
        }

        return $this->clean($this->path) === $this->clean($url) ? $true : $false;
    }
public function is($url = '', $true = true, $false = "")
    {
        if (is_array($url) && isset($url[0]) && is_int($url[0]) && $url[0] <= count($this->chunks)) {
            $chunk = isset($url[1]) && is_string($url[1]) ? $this->clean($url[1]) : '';

            return $this->clean($this->chunks[($url[0] - 1)]) === $chunk ? $true : $false;
        }

        return $this->clean($this->path) === $this->clean($url) ? $true : $false;
    }
public function is ( $ url = '' , $ true = true , $ false = "" ) { if ( is_array ( $ url ) && isset ( $ url [ 0 ] ) && is_int ( $ url [ 0 ] ) && $ url [ 0 ] <= count ( $ this -> chunks ) ) { $ chunk = isset ( $ url [ 1 ] ) && is_string ( $ url [ 1 ] ) ? $ this -> clean ( $ url [ 1 ] ) : '' ; return $ this -> clean ( $ this -> chunks [ ( $ url [ 0 ] - 1 ) ] ) === $ chunk ? $ true : $ false ; } return $ this -> clean ( $ this -> path ) === $ this -> clean ( $ url ) ? $ true : $ false ; }
Check if a given url match current url.
Is possible to specify url using a stringUri or an array where 1st item is url chunk number
and 2nd item is the chunk to match.

@param  string|array $url
@param  mixed        $true  What return if the compare is true
@param  mixed        $false What return if the compare is true
@return mixed
Check if a given url match current url . Is possible to specify url using a stringUri or an array where 1st item is url chunk number and 2nd item is the chunk to match .