Clim/Helper/DeferredDefinitionTrait.php
protected function assertPattern($pattern)
    {
        if (strlen($pattern) == 0) return null;

        $pattern = '/^'. str_replace('/', '\\/', $pattern). '$/';
        if (@preg_match($pattern, null) === false) {
            throw new DefinitionException("invalid regular expression pattern");
        }

        return $pattern;
    }
protected function assertPattern($pattern)
    {
        if (strlen($pattern) == 0) return null;

        $pattern = '/^'. str_replace('/', '\\/', $pattern). '$/';
        if (@preg_match($pattern, null) === false) {
            throw new DefinitionException("invalid regular expression pattern");
        }

        return $pattern;
    }
protected function assertPattern ( $ pattern ) { if ( strlen ( $ pattern ) == 0 ) return null ; $ pattern = '/^' . str_replace ( '/' , '\\/' , $ pattern ) . '$/' ; if ( @ preg_match ( $ pattern , null ) === false ) { throw new DefinitionException ( "invalid regular expression pattern" ) ; } return $ pattern ; }
Validate the regular expression pattern string
@param string $pattern
@return string|null
@throws DefinitionException
Validate the regular expression pattern string