本文整理汇总了PHP中Zend\Session\Container::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::getName方法的具体用法?PHP Container::getName怎么用?PHP Container::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\Session\Container
的用法示例。
在下文中一共展示了Container::getName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testPassingUnsetKeyInArrayToSetExpirationSecondsDoesNothing
public function testPassingUnsetKeyInArrayToSetExpirationSecondsDoesNothing()
{
$this->container->setExpirationSeconds(3600, array('foo'));
$storage = $this->manager->getStorage();
$metadata = $storage->getMetadata($this->container->getName());
$this->assertFalse(isset($metadata['EXPIRE_KEYS']['foo']));
}
示例2: indexAction
public function indexAction()
{
$session = new Container('base');
$session->bar = 'foobar';
echo $session->bar;
echo $session->getName();
return new ViewModel();
}
示例3: resetAction
/**
* Start over with the upgrade process in case of an error.
*
* @return mixed
*/
public function resetAction()
{
foreach (array_keys($this->cookie->getAllValues()) as $k) {
unset($this->cookie->{$k});
}
$storage = $this->session->getManager()->getStorage();
$storage[$this->session->getName()] = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS);
return $this->forwardTo('Upgrade', 'Home');
}
示例4: testPassingNameToConstructorInstantiatesContainerWithThatName
public function testPassingNameToConstructorInstantiatesContainerWithThatName()
{
$container = new Container('foo', $this->manager);
$this->assertEquals('foo', $container->getName());
}
示例5: testUsingNewZF2NamespaceIsValid
public function testUsingNewZF2NamespaceIsValid()
{
$container = new Container('Zend\\Foo', $this->manager);
$this->assertEquals('Zend\\Foo', $container->getName());
}