You are here

public function ApcCache::has in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/validator/Mapping/Cache/ApcCache.php \Symfony\Component\Validator\Mapping\Cache\ApcCache::has()

Returns whether metadata for the given class exists in the cache.

Parameters

string $class:

Overrides CacheInterface::has

File

vendor/symfony/validator/Mapping/Cache/ApcCache.php, line 35

Class

ApcCache

Namespace

Symfony\Component\Validator\Mapping\Cache

Code

public function has($class) {
  if (!function_exists('apc_exists')) {
    $exists = false;
    apc_fetch($this->prefix . $class, $exists);
    return $exists;
  }
  return apc_exists($this->prefix . $class);
}