/** * gets the entry associted to the serial * * @access public * @author Jerome Bogaerts, <*****@*****.**> * @param string serial * @return common_Serializable * @throws common_cache_NotFoundException */ public function get($serial) { $returnValue = $this->persistence->get($serial); if ($returnValue === false && !$this->has($serial)) { $msg = "No cache entry found for '" . $serial . "'."; throw new common_cache_NotFoundException($msg); } return $returnValue; }
/** * Retore the state of the service call * Returns null if no state is found * * @param string $userId * @param string $callId * @return string */ public function get($userId, $callId) { $key = $this->getSerial($userId, $callId); $returnValue = $this->persistence->get($key); if ($returnValue === false && !$this->has($userId, $callId)) { $returnValue = null; } return $returnValue; }
/** * @depends testConnect * @author Lionel Lecaque, lionel@taotesting.com * @param common_persistence_KeyValuePersistence $persistence */ public function testGet($persistence) { $this->assertFalse($persistence->get('fakeKeyName')); }
/** * @depends testConnect * @author Lionel Lecaque, lionel@taotesting.com * @param common_persistence_KeyValuePersistence $persistence */ public function testGet($persistence) { $this->assertTrue($persistence->set('fakeKeyName', 'value')); $this->assertEquals('value', $persistence->get('fakeKeyName')); }