setItem() публичный Метод

save the content into an php file
public setItem ( string $cacheId, mixed $content, boolean $withVersion = true ) : boolean
$cacheId string The cache id
$content mixed The content to store
$withVersion boolean
Результат boolean whether the file was correctly written to the disk
Пример #1
0
 public function testType()
 {
     $adapter = new Memory();
     $cache = new BrowscapCache($adapter);
     $this->assertNull($cache->getType());
     $cache->setItem('browscap.type', 'LITE', false);
     $this->assertEquals('LITE', $cache->getType());
 }