Cache\Adapter\Common\AbstractCachePool::validateKey PHP Method

validateKey() protected method

protected validateKey ( string $key )
$key string
    protected function validateKey($key)
    {
        if (!is_string($key)) {
            throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given', gettype($key)));
        }
        if (preg_match('|[\\{\\}\\(\\)/\\\\@\\:]|', $key)) {
            throw new InvalidArgumentException(sprintf('Invalid key: "%s". The key contains one or more characters reserved for future extension: {}()/\\@:', $key));
        }
    }