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


PHP Registry::getInstancia方法代码示例

本文整理汇总了PHP中Registry::getInstancia方法的典型用法代码示例。如果您正苦于以下问题:PHP Registry::getInstancia方法的具体用法?PHP Registry::getInstancia怎么用?PHP Registry::getInstancia使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Registry的用法示例。


在下文中一共展示了Registry::getInstancia方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $this->_registry = Registry::getInstancia();
     $this->_acl = $this->_registry->_acl;
     $this->_request = $this->_registry->_request;
     $this->_view = new View($this->_request, $this->_acl);
 }
开发者ID:poehlmann,项目名称:tesis,代码行数:7,代码来源:Controller.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     //carga el registro para reutilizarlo
     $this->_registry = Registry::getInstancia();
     $this->_modelo = new cetprosModel();
 }
开发者ID:enkee,项目名称:mvc20a,代码行数:7,代码来源:menu.php

示例3: __construct

 public function __construct()
 {
     $this->_registry = Registry::getInstancia();
     //instancia la base de datos del sistema y la red
     $this->_db = $this->_registry->_db;
     //$this->_dbs = $this->_registry->_dbs;
     //instancia la base de datos de los cetpros
     $this->_dbMod = $this->_registry->_dbMod;
 }
开发者ID:enkee,项目名称:mvc20a,代码行数:9,代码来源:Model.php

示例4: __construct

 public function __construct()
 {
     //No se crea una nueva instancia, se utiliza el mismo metodo
     $this->_registry = Registry::getInstancia();
     $this->_acl = $this->_registry->_acl;
     //Como ya la clase request esta almacenanda en el registro
     //se accede al registro
     $this->_request = $this->_registry->_request;
     $this->_view = new View($this->_request);
 }
开发者ID:DeepCodeLA,项目名称:Sistema-de-Ventas,代码行数:10,代码来源:Controller.php

示例5: __construct

 public function __construct()
 {
     $this->_registry = Registry::getInstancia();
     #$this->_menu = new menu(); Ex: $this->_view = new View(new Request, $this->_menu);
     $this->_acl = $this->_registry->_acl;
     $this->_request = $this->_registry->_request;
     $this->_view = new View($this->_request, $this->_acl);
     $this->_ip = new Env_ip();
     $this->_Log = new logsModel();
     $this->getLibrary(array('class.oemail', 'class.validators'));
     // Carga la libreria de validacion de email
     $this->_view->setJsPlugin(array('tooltip'));
     $this->_roles = new ACL();
 }
开发者ID:nicomagliaro,项目名称:personalsis,代码行数:14,代码来源:Controller.php

示例6: __construct

 public function __construct($id = false)
 {
     if ($id) {
         $this->_id = (int) $id;
     } else {
         if (Session::get('id_usuario')) {
             $this->_id = Session::get('id_usuario');
         } else {
             $this->_id = 0;
         }
     }
     $this->_registry = Registry::getInstancia();
     $this->_db = $this->_registry->_db;
     //$this->_role = $this->getRole();
     //$this->_permisos = $this->getPermisosRole();
 }
开发者ID:DeepCodeLA,项目名称:Sistema-de-Ventas,代码行数:16,代码来源:Acl.php

示例7: __construct

 public function __construct($id = false)
 {
     if ($id) {
         $this->_id = (int) $id;
     } else {
         if (Session::get('id_usuario')) {
             //id_usuario se declara en el login
             $this->_id = Session::get('id_usuario');
             //Si el usuario se ha registrado coge su id
         } else {
             $this->_id = 0;
             //Si el usuario no se ha registrado el acceso está registrido.
         }
     }
     $this->_registry = Registry::getInstancia();
     $this->_db = $this->_registry->_db;
     $this->_role = $this->getRole();
     $this->_permisos = $this->getPermisosRole();
     $this->compilarAcl();
 }
开发者ID:japriego,项目名称:publico01,代码行数:20,代码来源:Acl.php

示例8: __construct

 public function __construct()
 {
     $this->_registry = Registry::getInstancia();
     $this->_db = $this->_registry->_db;
 }
开发者ID:JonathanEstay,项目名称:panamericanaturismo.cl,代码行数:5,代码来源:Model.php

示例9: ini_set

<?php

ini_set('display_errors', 1);
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', realpath(dirname(__FILE__)) . DS);
define('APP_PATH', ROOT . 'application' . DS);
define('TIMEZONE', 'Europe/Madrid');
try {
    require_once APP_PATH . 'Autoload.php';
    require_once APP_PATH . 'Config.php';
    /* Configurar parametros de hora del sistema */
    date_default_timezone_set(TIMEZONE);
    Session::init();
    $registry = Registry::getInstancia();
    $registry->_request = new Request();
    $registry->_db = new Database(DB_HOST, DB_NAME, DB_USER, DB_PASS, DB_CHAR);
    $registry->_acl = new ACL();
    Bootstrap::run($registry->_request);
} catch (Exception $e) {
    echo $e->getMessage();
}
开发者ID:nicomagliaro,项目名称:personalsis,代码行数:21,代码来源:index.php


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