本文整理汇总了PHP中App::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP App::__construct方法的具体用法?PHP App::__construct怎么用?PHP App::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类App
的用法示例。
在下文中一共展示了App::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->sapi['cli']['import'] = array('file' => 'import.php', 'class' => 'WeaverImport', 'description' => 'Import story data from a file');
$this->sapi['cli']['sync'] = array('file' => 'sync.php', 'class' => 'WeaverSync', 'description' => 'Synchronise dirty objects');
$this->sapi['cli']['delete'] = array('file' => 'delete.php', 'class' => 'WeaverDelete', 'description' => 'Delete an object');
}
示例2: __construct
public function __construct()
{
$this->mod = 'test';
$this->debug = true;
$this->logger = 'test';
parent::__construct();
}
示例3: __construct
public function __construct($argv)
{
$this->mode = 'com';
$this->app_env = Pi::get('app_env', '');
$this->com_env = Pi::get('com_env', '');
parent::__construct();
}
示例4: __construct
public function __construct($config, $router)
{
if (!IS_WORKSPACE && !isset($_SERVER["HTTP_X_REQUESTED_WITH"])) {
exit;
}
parent::__construct($config, $router);
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->sapi['cli']['import'] = array('file' => 'import.php', 'class' => 'MediaImport', 'description' => 'Import media data from a file');
$this->sapi['cli']['convert-tva'] = array('file' => 'convert-tva.php', 'class' => 'MediaConvertTVA', 'description' => 'Convert TV-Anytime classification scheme XML');
$this->sapi['cli']['sync'] = array('file' => 'sync.php', 'class' => 'MediaSync', 'description' => 'Synchronise dirty objects');
$this->sapi['cli']['delete'] = array('file' => 'delete.php', 'class' => 'MediaDelete', 'description' => 'Delete an object');
}
示例6:
/**
* Constructor
* @param array|object $initObj
*/
function __construct($initObj = null)
{
// default option to false
$this->setOptin();
parent::__construct($initObj);
// define errors
$this->getErrorObj()->setDescription("ENTRY_FIRST_EMPTY", "First name is empty.")->setDescription("ENTRY_LAST_EMPTY", "Last name is empty.")->setDescription("ENTRY_EMAIL_INVALID", "Email is not valid.")->setDescription("ENTRY_DB_ERROR", "Error inserting into entry table.");
}
示例7: __construct
public function __construct()
{
parent::__construct();
$this->load->model('profile_model', 'profile');
$this->load->model('heir_model', 'heir');
$this->load->model('bank_model', 'bank');
$this->load->model('province_model', 'province');
$this->load->model('city_model', 'city');
}
示例8: __construct
public function __construct()
{
parent::__construct();
$this->load->model('invoice_model', 'invoice');
$this->load->model('payment_model', 'payment');
$this->load->model('income_model', 'income');
$this->load->model('order_model', 'order');
$this->load->helper('common');
}
示例9: __construct
public function __construct()
{
parent::__construct();
$this->load->model('permission_model', 'permission');
$this->load->helper('common');
if (!$this->acl->hasPermission($this->url) && $this->roleName != "super") {
show_404();
}
}
示例10: __construct
public function __construct()
{
parent::__construct();
$id = $this->id;
$status = $this->status;
$cep = $this->cep;
$endereco = $this->endereco;
$bairro = $this->bairro;
$cidade = $this->cidade;
$estado = $this->estado;
}
示例11: __construct
/**
* Construct a new App_test object
*
* @param String $uri an optional relative URI (e.g. "/folder/file")
*/
public function __construct($uri = NULL)
{
$this->is_testing = TRUE;
parent::__construct($uri);
if (Config::get('TESTING_ENABLED') !== TRUE) {
parent::redirect('', array('exit' => TRUE));
}
$this->reset_folder();
$this->test_run = NULL;
// Translations need validating
Translate::validate();
}
示例12: __construct
public function __construct()
{
if (!defined("APP_CTR_ROOT")) {
die('please define APP_CTR_ROOT const');
}
if (!defined("APP_NAME")) {
die('please define APP_NAME const');
}
$this->mode = 'web';
$this->env = Pi::get('env', 'online');
parent::__construct();
}
示例13: __construct
public function __construct()
{
global $ADMIN_ROUTES;
parent::__construct();
$this->sapi['http'] = array_merge($this->sapi['http'], $ADMIN_ROUTES);
if (!isset($this->routes['__NONE__'])) {
$this->routes['__NONE__'] = array('class' => 'AdminRedirect');
}
if (!isset($this->routes['__DEFAULT__'])) {
$this->routes['__DEFAULT__'] = array('class' => 'AdminRedirect');
}
}
示例14: __construct
public function __construct($file, $php_self, $request_uri)
{
global $config;
##
parent::__construct($file, $php_self, $request_uri);
## override default user with sessionUser
if ($this->hasSessionUser()) {
$this->user = $this->getSessionUser();
}
##
$this->theme = $config['default']['theme'];
##
define('__LOGO__', __URL__ . (isset($config['logo']) ? $config['logo'] : '/public/images/logo.png'));
define('__THEME__', __BASE__ . '/theme/' . $this->theme);
}
示例15: __construct
public function __construct($argv = array())
{
if (!defined("APP_NAME")) {
die("app.err please define APP_NAME const \n");
}
$this->mode = 'api';
$this->env = Pi::get('env', 'online');
$data_type = Conf::get("global.data_type", 'json');
if (isset($this->data_types[$data_type])) {
$this->data_type = $data_type;
}
parent::__construct();
//debug
if ($this->debug && !empty($argv)) {
$_REQUEST['mod'] = $argv[1];
$_REQUEST['func'] = $argv[2];
}
}