src/ImageStack/Cache/RawFileCache.php
protected function assertValidId($id)
    {
        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
            $bad = preg_match('/[\x00-\x1F\x7F]\<\>\:\"\|\?\*]/', $id);
        } else {
            $bad = preg_match('/\x00/', $id);
        }
        if ($bad) {
            throw new RawFileCacheException('Invalid character found in cache ID', RawFileCacheException::INVALID_CHARACTER);
        }
    }
protected function assertValidId($id)
    {
        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
            $bad = preg_match('/[\x00-\x1F\x7F]\<\>\:\"\|\?\*]/', $id);
        } else {
            $bad = preg_match('/\x00/', $id);
        }
        if ($bad) {
            throw new RawFileCacheException('Invalid character found in cache ID', RawFileCacheException::INVALID_CHARACTER);
        }
    }
protected function assertValidId ( $ id ) { if ( defined ( 'PHP_WINDOWS_VERSION_BUILD' ) ) { $ bad = preg_match ( '/[\x00-\x1F\x7F]\<\>\:\"\|\?\*]/' , $ id ) ; } else { $ bad = preg_match ( '/\x00/' , $ id ) ; } if ( $ bad ) { throw new RawFileCacheException ( 'Invalid character found in cache ID' , RawFileCacheException :: INVALID_CHARACTER ) ; } }
Assert that cache ID is usable as file path.
@param string $id
@throws \InvalidArgumentException
Assert that cache ID is usable as file path .