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

Read content of cache.
public read ( ) : Serializable
Результат Serializable
Пример #1
0
 /**
  * Returns system collections.
  *
  * @return array
  */
 private function getSystemCollections()
 {
     if (!$this->systemCollections) {
         if (!$this->cache->isFresh()) {
             $systemCollections = $this->buildSystemCollections($this->locale, $this->getUserId());
             $this->cache->write($systemCollections);
         }
         $this->systemCollections = $this->cache->read();
     }
     return $this->systemCollections;
 }
Пример #2
0
 /**
  * @depends testWrite
  */
 public function testRead(CacheInterface $cache)
 {
     $this->assertEquals(['test' => 'test'], $cache->read());
 }