コード例 #1
0
ファイル: Cache.php プロジェクト: boskee/BeSimpleSoapBundle
 public function __construct($cacheDisabled, $type, $directory, $lifetime = null, $limit = null)
 {
     $isEnabled = (bool) $cacheDisabled ? BaseCache::DISABLED : BaseCache::ENABLED;
     BaseCache::setEnabled($isEnabled);
     BaseCache::setType($type);
     BaseCache::setDirectory($directory);
     if (null !== $lifetime) {
         BaseCache::setLifetime($lifetime);
     }
     if (null !== $limit) {
         BaseCache::setLimit($limit);
     }
 }
コード例 #2
0
ファイル: CacheTest.php プロジェクト: mablae/BeSimpleSoap
 public function testSetTypeBadValue()
 {
     $this->setExpectedException('InvalidArgumentException');
     Cache::setType('foo');
 }