getId() public méthode

public getId ( )
 public function testCacheKey()
 {
     $ck = new CacheKey('base', 'id', 'sub');
     $this->assertEquals('base', $ck->getBase());
     $this->assertEquals('id', $ck->getId());
     $this->assertEquals('sub', $ck->getSub());
     $ck = new CacheKey(null, null);
     $ck->setBase('base')->setId('id')->setSub('sub');
     $this->assertEquals('base', $ck->getBase());
     $this->assertEquals('id', $ck->getId());
     $this->assertEquals('sub', $ck->getSub());
     $this->assertNotNull($ck->getHash());
 }
 /**
  * Converts cachekey to a string for the data group.
  *
  * @param CacheKey $k
  * @return string
  */
 private function getGroupString(CacheKey $k)
 {
     return md5(strtr($this->namespace . $k->getBase() . $k->getId(), ' ', '_'));
 }
Exemple #3
0
 /**
  * @codeCoverageIgnore
  */
 protected function hashKey(CacheKey $k)
 {
     return $k->getBase() . $k->getId() . serialize($k->getSub());
 }