本文整理汇总了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);
}
示例2: __construct
public function __construct()
{
parent::__construct();
//carga el registro para reutilizarlo
$this->_registry = Registry::getInstancia();
$this->_modelo = new cetprosModel();
}
示例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;
}
示例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);
}
示例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();
}
示例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();
}
示例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();
}
示例8: __construct
public function __construct()
{
$this->_registry = Registry::getInstancia();
$this->_db = $this->_registry->_db;
}
示例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();
}