public function path(array $condition)
    {
        if (!in_array($condition['operator'], array('=', '!='))) {
            return false;
        }

        $path = $this->url->path();

        $found = false;

        foreach ((array) $condition['value'] as $pattern) {
            if (gplcart_path_match($path, $pattern)) {
                $found = true;
            }
        }

        return $condition['operator'] === '=' ? $found : !$found;
    }
public function path(array $condition)
    {
        if (!in_array($condition['operator'], array('=', '!='))) {
            return false;
        }

        $path = $this->url->path();

        $found = false;

        foreach ((array) $condition['value'] as $pattern) {
            if (gplcart_path_match($path, $pattern)) {
                $found = true;
            }
        }

        return $condition['operator'] === '=' ? $found : !$found;
    }
public function path ( array $ condition ) { if ( ! in_array ( $ condition [ 'operator' ] , array ( '=' , '!=' ) ) ) { return false ; } $ path = $ this -> url -> path ( ) ; $ found = false ; foreach ( ( array ) $ condition [ 'value' ] as $ pattern ) { if ( gplcart_path_match ( $ path , $ pattern ) ) { $ found = true ; } } return $ condition [ 'operator' ] === '=' ? $ found : ! $ found ; }
Returns true if path condition is met
@param array $condition
@return boolean
Returns true if path condition is met