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


PHP Container::getArrayCopy方法代码示例

本文整理汇总了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();
 }
开发者ID:cityware,项目名称:city-db,代码行数:6,代码来源:Zend.php

示例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());
     }
 }
开发者ID:cityware,项目名称:city-db,代码行数:42,代码来源:Zend.php

示例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();
 }
开发者ID:cityware,项目名称:city-form,代码行数:9,代码来源:Zend.php

示例4: testGetArrayCopyFromContainer

 public function testGetArrayCopyFromContainer()
 {
     $container = new Container('test');
     $container->foo = 'bar';
     $container->baz = 'qux';
     $this->assertSame(array('foo' => 'bar', 'baz' => 'qux'), $container->getArrayCopy());
 }
开发者ID:pnaq57,项目名称:zf2demo,代码行数:7,代码来源:SessionArrayStorageTest.php

示例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]);
     }
 }
开发者ID:bix0r,项目名称:Stjornvisi,代码行数:22,代码来源:AuthController.php


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