src/xPDO/Cache/xPDOCacheManager.php
public function endsWith($string, $pattern) {
        $matched= false;
        if (is_string($string) && ($stringLen= strlen($string))) {
            if (is_array($pattern)) {
                foreach ($pattern as $subPattern) {
                    if (is_string($subPattern) && $this->endsWith($string, $subPattern)) {
                        $matched= true;
                        break;
                    }
                }
            } elseif (is_string($pattern)) {
                if (($patternLen= strlen($pattern)) && $stringLen >= $patternLen) {
                    $matched= (substr($string, -$patternLen) === $pattern);
                }
            }
        }
        return $matched;
    }
public function endsWith($string, $pattern) {
        $matched= false;
        if (is_string($string) && ($stringLen= strlen($string))) {
            if (is_array($pattern)) {
                foreach ($pattern as $subPattern) {
                    if (is_string($subPattern) && $this->endsWith($string, $subPattern)) {
                        $matched= true;
                        break;
                    }
                }
            } elseif (is_string($pattern)) {
                if (($patternLen= strlen($pattern)) && $stringLen >= $patternLen) {
                    $matched= (substr($string, -$patternLen) === $pattern);
                }
            }
        }
        return $matched;
    }
public function endsWith ( $ string , $ pattern ) { $ matched = false ; if ( is_string ( $ string ) && ( $ stringLen = strlen ( $ string ) ) ) { if ( is_array ( $ pattern ) ) { foreach ( $ pattern as $ subPattern ) { if ( is_string ( $ subPattern ) && $ this -> endsWith ( $ string , $ subPattern ) ) { $ matched = true ; break ; } } } elseif ( is_string ( $ pattern ) ) { if ( ( $ patternLen = strlen ( $ pattern ) ) && $ stringLen >= $ patternLen ) { $ matched = ( substr ( $ string , - $ patternLen ) === $ pattern ) ; } } } return $ matched ; }
Sees if a string ends with 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 ends with the pattern or any of the patterns provided.
Sees if a string ends with a specific pattern or set of patterns .