src/xPDO/Cache/xPDOCacheManager.php
public function matches($string, $pattern) {
        $matched= false;
        if (is_string($string) && ($stringLen= strlen($string))) {
            if (is_array($pattern)) {
                foreach ($pattern as $subPattern) {
                    if (is_string($subPattern) && $this->matches($string, $subPattern)) {
                        $matched= true;
                        break;
                    }
                }
            } elseif (is_string($pattern)) {
                $matched= preg_match($pattern, $string);
            }
        }
        return $matched;
    }
public function matches($string, $pattern) {
        $matched= false;
        if (is_string($string) && ($stringLen= strlen($string))) {
            if (is_array($pattern)) {
                foreach ($pattern as $subPattern) {
                    if (is_string($subPattern) && $this->matches($string, $subPattern)) {
                        $matched= true;
                        break;
                    }
                }
            } elseif (is_string($pattern)) {
                $matched= preg_match($pattern, $string);
            }
        }
        return $matched;
    }
public function matches ( $ string , $ pattern ) { $ matched = false ; if ( is_string ( $ string ) && ( $ stringLen = strlen ( $ string ) ) ) { if ( is_array ( $ pattern ) ) { foreach ( $ pattern as $ subPattern ) { if ( is_string ( $ subPattern ) && $ this -> matches ( $ string , $ subPattern ) ) { $ matched = true ; break ; } } } elseif ( is_string ( $ pattern ) ) { $ matched = preg_match ( $ pattern , $ string ) ; } } return $ matched ; }
Sees if a string matches a specific pattern or set of patterns.

@access public
@param string $string The string to check.
@param string|array $pattern The pattern or an array of patterns to check against.
@return boolean True if the string matched the pattern or any of the patterns provided.
Sees if a string matches a specific pattern or set of patterns .