本文整理汇总了PHP中Zend\Session\Container::getArrayCopy方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::getArrayCopy方法的具体用法?PHP Container::getArrayCopy怎么用?PHP Container::getArrayCopy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\Session\Container
的用法示例。
在下文中一共展示了Container::getArrayCopy方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$sessionRoute = new \Zend\Session\Container('globalRoute');
$sessionRoute->setExpirationSeconds(3600);
$this->aSession = $sessionRoute->getArrayCopy();
}
示例2: geraLogSistema
/**
* Gera o Log das ações de INSERT, UPDATE e DELETE executados pla plataforma
* @param string $query
* @return \Cityware\Db\Adapter\ZendAdapter
*/
private function geraLogSistema($query, $queryAction)
{
try {
/* Pega o IP do usuário */
$ip = new \Cityware\Utility\Ip\CaptureIp();
/* Obtem o indece da sessão */
$indexSession = strtoupper($this->aSession['moduleName']);
$sessionNamespace = new SessionContainer($indexSession);
$aSession = $sessionNamespace->getArrayCopy();
$this->varExecuteLog = false;
if (isset($aSession['acl'])) {
unset($aSession['acl']);
}
if (isset($aSession['menu'])) {
unset($aSession['menu']);
}
$this->insert('des_modulo', $this->aSession['moduleName']);
$this->insert('des_acao', $this->aSession['actionName']);
$this->insert('des_controlador', $this->aSession['controllerName']);
$this->insert('des_session', json_encode($aSession));
$this->insert('des_queryaction', strtoupper($queryAction));
$this->insert('des_sqlquery', str_replace("'", '\\"', $query));
$this->insert('des_phpserver', json_encode($_SERVER));
$this->insert('des_ip', $ip->IP['client']);
$this->insert('des_proxy', $ip->IP['proxy']);
$this->insert('dta_cadastro', date('Y-m-d H:i:s'));
$this->insert('ind_status', 'A');
$this->from('tab_db_log', null, 'log');
$this->setDebug(false);
$this->setReturnInsertId(false);
$this->setAdapter('adapter');
$this->executeInsertQuery();
$this->varExecuteLog = true;
} catch (\Exception $exc) {
throw new \Exception('Erro ao tentar gravar o log do sistema - ' . $exc->getMessage());
}
}
示例3: __construct
/**
* Função construtora da classe
*/
public function __construct($name = null, $options = array())
{
parent::__construct($name, $options);
$sessionRoute = new SessionContainer('globalRoute');
self::$aSession = $sessionRoute->getArrayCopy();
}
示例4: testGetArrayCopyFromContainer
public function testGetArrayCopyFromContainer()
{
$container = new Container('test');
$container->foo = 'bar';
$container->baz = 'qux';
$this->assertSame(array('foo' => 'bar', 'baz' => 'qux'), $container->getArrayCopy());
}
示例5: createUserLoginAction
/**
* Last installment of creating user in the system.
*
* @return ViewModel
*/
public function createUserLoginAction()
{
$session = new Container('create_user');
$form = new NewUserPassword();
$form->get('name')->setValue($session->email);
if ($this->getRequest()->isPost()) {
$form->setData($this->getRequest()->getPost());
if ($form->isValid()) {
$session->password = $form->get('password')->getValue();
return $this->redirect()->toRoute('access/confirm');
} else {
return new ViewModel(['data' => (object) $session->getArrayCopy(), 'form' => $form]);
}
} else {
return new ViewModel(['data' => (object) $session->getArrayCopy(), 'form' => $form]);
}
}