public function read($id) { $data = parent::read($id); if (!$data) { return ""; } else { return decrypt($data, $this->key); } }
/** * This function is automatically called after the "open" function * Use the PHP default "read" function, then save the data and close the session if the session has not to be locked * * @param string $session_id * * @return string */ public function read($session_id) { $data = parent::read($session_id); $this->session = $this->unserialize_session_data($data); if (!$this->lock) { $_SESSION = $this->session; session_write_close(); } return $data; }
public function test_write_without_ttl() { $client = $this->prophesize('Blablacar\\Memcached\\Test\\Client'); $client->quit()->shouldBeCalledTimes(1); $client->set(Argument::type('string'), Argument::type('string'))->will(function ($args) { $this->get($args[0])->willReturn($args[1])->shouldBeCalledTimes(1); return true; })->shouldBeCalledTimes(1); $handler = new SessionHandler($client->reveal()); $this->assertTrue($handler->write('key', 'value')); $this->assertEquals('value', $handler->read('key')); }
/** * Workaround for php7 session_regenerate_id error * @see https://bugs.php.net/bug.php?id=71187 * * @param string $sessionId * @return string */ public function read($sessionId) { return (string) parent::read($sessionId); }
public function read($key) { ++$this->i; echo 'Read ', session_id(), "\n"; return parent::read($key); }
/** * Read session data * * @param string $sessionId * @return string */ public function read($sessionId) { return $this->saveHandlerAdapter->read($sessionId); }
public function read($session_id) { $data = parent::read($session_id); return mcrypt_decrypt(MCRYPT_3DES, $this->key, $data, MCRYPT_MODE_ECB); }
public function read($id) { return mcrypt_decrypt(MCRYPT_3DES, $this->key, parent::read($id), MCRYPT_MODE_ECB); }
/** * {@inheritdoc } */ public function read($sessionId) { return (string) $this->handler->read($sessionId); }
public function read($key) { ++$this->i; return parent::read($key); }
public function read($id) { $data = parent::read($id); $data = mcrypt_decrypt(MCRYPT_3DES, $this->s_session_key, $data, MCRYPT_MODE_ECB); return $data; }
public function read($session_id) { return mcrypt_decrypt(self::$cipher, \Config::$encryptionKey, parent::read($session_id), self::$mode); }
public function read($id) { // should error because parent::open hasn't been called return parent::read($id); }
public function read($session_id) { return parent::read($session_id); }
/** * Reads data from session. * * @param string $id The session id * * @return string session data */ public function read($id) { return mcrypt_decrypt($this->sessionCipherAlgorithm, $this->sessionCipherKey, parent::read($id), $this->sessionCipherMode); }
public function read($key) { $this->initRedis(); $this->lock($key); return parent::read($key); }
public function read($id) { $data = parent::read($id); var_dump($data); return mcrypt_decrypt(MCRYPT_3DES, $this->key, $data, MCRYPT_MODE_ECB); }