本文整理匯總了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]);
}
}