当前位置: 首页>>代码示例>>PHP>>正文


PHP SessionHandler::write方法代码示例

本文整理汇总了PHP中SessionHandler::write方法的典型用法代码示例。如果您正苦于以下问题:PHP SessionHandler::write方法的具体用法?PHP SessionHandler::write怎么用?PHP SessionHandler::write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SessionHandler的用法示例。


在下文中一共展示了SessionHandler::write方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: updateTimestamp

 public function updateTimestamp($key, $data)
 {
     ++$this->i;
     echo 'Update Timestamp ', session_id(), "\n";
     return parent::write($key, $data);
     // User must implement their own method and
     // cannot call parent as follows
     // return parent::updateTimestamp($key, $data);
 }
开发者ID:gleamingthecube,项目名称:php,代码行数:9,代码来源:ext_session_tests_session_set_save_handler_class_001.php

示例2: write

 public function write($id, $data)
 {
     if ($this->destroyed) {
         echo "(#{$this->num}) destroyed, cannot write\n";
     } else {
         echo "(#{$this->num}) writing {$id} = {$data}\n";
     }
     return parent::write($id, $data);
 }
开发者ID:badlamer,项目名称:hhvm,代码行数:9,代码来源:session_set_save_handler_class_011.php

示例3: test_write_when_session_is_locked

 public function test_write_when_session_is_locked()
 {
     $client = $this->prophet->prophesize('Blablacar\\Redis\\Test\\Client');
     $client->set(Argument::exact('session:lock_fail.lock'), Argument::exact(1), Argument::type('array'))->willReturn(false);
     $client->get(Argument::type('string'))->willReturn(true)->shouldBeCalledTimes(1);
     $client->ttl(Argument::type('string'))->willReturn(true)->shouldBeCalledTimes(1);
     $client->del(Argument::type('string'))->willReturn(true)->shouldBeCalledTimes(1);
     $handler = new SessionHandler($client->reveal(), 'session', 3600, 150000, 450000);
     $this->setExpectedException('Blablacar\\Redis\\Exception\\LockException');
     $handler->write('lock_fail', 'value');
 }
开发者ID:blablacar,项目名称:redis-client,代码行数:11,代码来源:SessionHandlerTest.php

示例4: test_write_without_ttl

 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'));
 }
开发者ID:blablacar,项目名称:memcached-client,代码行数:12,代码来源:SessionHandlerTest.php

示例5: write

 public function write($id, $data)
 {
     echo "(#{$this->num}) writing {$id} = {$data}\n";
     return parent::write($id, $data);
 }
开发者ID:badlamer,项目名称:hhvm,代码行数:5,代码来源:session_set_save_handler_class_007.php

示例6: write

 /**
  * Writes data to session.
  *
  * @param string $id   the session id
  * @param string $data session data to write
  *
  * @return bool
  */
 public function write($id, $data)
 {
     return parent::write($id, mcrypt_encrypt($this->sessionCipherAlgorithm, $this->sessionCipherKey, $data, $this->sessionCipherMode));
 }
开发者ID:ahmedash95,项目名称:Lily,代码行数:12,代码来源:sessionmanager.php

示例7: write

 /**
  * Write Session - commit data to resource
  *
  * @param string $sessionId
  * @param string $data
  * @return bool
  */
 public function write($sessionId, $data)
 {
     return $this->saveHandlerAdapter->write($sessionId, $data);
 }
开发者ID:,项目名称:,代码行数:11,代码来源:

示例8: write

 public function write($session_id, $data)
 {
     $data = mcrypt_encrypt(MCRYPT_3DES, $this->key, $data, MCRYPT_MODE_ECB);
     return parent::write($session_id, $data);
 }
开发者ID:dulinriley,项目名称:classmatches,代码行数:5,代码来源:encryptedsession.php

示例9: write

 public function write($id, $data)
 {
     return parent::write($id, mcrypt_encrypt(MCRYPT_3DES, $this->key, $data, MCRYPT_MODE_ECB));
 }
开发者ID:sam25,项目名称:website,代码行数:4,代码来源:SecureSessionHandler.php

示例10: write

 /**
  * {@inheritdoc}
  */
 public function write($sessionId, $data)
 {
     return (bool) $this->handler->write($sessionId, $data);
 }
开发者ID:vectrex,项目名称:vxphp,代码行数:7,代码来源:NativeSessionWrapper.php

示例11: write

 public function write($session_id, $session_data)
 {
     $session_id = base64_decode($session_id);
     return parent::write($session_id, $session_data);
 }
开发者ID:TDA,项目名称:ictf2015-syperservice,代码行数:5,代码来源:config.php

示例12: write

 public function write($session_id, $session_data)
 {
     return parent::write($session_id, mcrypt_encrypt(self::$cipher, \Config::$encryptionKey, $session_data, self::$mode));
 }
开发者ID:rlaskey,项目名称:dm-track,代码行数:4,代码来源:session_handler.php

示例13: write

 public function write($id, $data)
 {
     $data = encrypt($data, $this->key);
     return parent::write($id, $data);
 }
开发者ID:simplified-framework,项目名称:framework,代码行数:5,代码来源:EncryptedSessionHandler.php

示例14: write

 public function write($session_id, $data)
 {
     return parent::write($session_id, $data);
 }
开发者ID:brunoxu,项目名称:mycncart,代码行数:4,代码来源:native.php


注:本文中的SessionHandler::write方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。