當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。