LdapTools\Cache\NoCache::setOptions PHP Method

setOptions() public method

public setOptions ( array $options )
$options array
    public function setOptions(array $options)
    {
    }

Usage Example

Beispiel #1
0
 /**
  * Retrieve the Cache object by its configured type and options.
  *
  * @param $type
  * @param array $options
  * @return CacheInterface
  */
 public static function get($type, array $options)
 {
     if (self::TYPE_STASH == $type) {
         $cache = new StashCache();
     } elseif (self::TYPE_DOCTRINE == $type) {
         $cache = new DoctrineCache();
     } elseif (self::TYPE_NONE == $type) {
         $cache = new NoCache();
     } else {
         throw new InvalidArgumentException(sprintf('Unknown cache type "%s".', $type));
     }
     $cache->setOptions($options);
     return $cache;
 }