本文整理匯總了PHP中DefaultController::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP DefaultController::__construct方法的具體用法?PHP DefaultController::__construct怎麽用?PHP DefaultController::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DefaultController
的用法示例。
在下文中一共展示了DefaultController::__construct方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct()
{
parent::__construct();
# initialize the Perms controller
$this->_model = new Perms();
$this->activeSection = 'perms';
}
示例2: __construct
public function __construct()
{
parent::__construct();
if (!isset($this->cache) || !is_array($this->cache)) {
static::raiseError(__METHOD__ . '(), $cache property is not an array!', true);
return;
}
if (!isset($this->cache_index) || !is_array($this->cache_index)) {
static::raiseError(__METHOD__ . '(), $cache_index property is not an array!', true);
return;
}
}
示例3: __construct
public function __construct()
{
if (!$this->removeExpiredJobs()) {
static::raiseError('removeExpiredJobs() returned false!', true);
return false;
}
try {
$this->registerHandler('delete-request', array($this, 'handleDeleteRequest'));
$this->registerHandler('save-request', array($this, 'handleSaveRequest'));
} catch (\Exception $e) {
static::raiseError(__METHOD__ . '(), failed to register handlers!', true);
return false;
}
// Define the JSON errors.
$constants = get_defined_constants(true);
$this->json_errors = array();
foreach ($constants["json"] as $name => $value) {
if (!strncmp($name, "JSON_ERROR_", 11)) {
$this->json_errors[$value] = $name;
}
}
parent::__construct();
return true;
}
示例4: __construct
public function __construct(SearchModel $model)
{
parent::__construct($model);
$this->model = $model;
}
示例5: __construct
public function __construct(ProfileModel $model)
{
parent::__construct($model);
$this->model = $model;
}
示例6: __construct
public function __construct(DefaultModel $model)
{
parent::__construct($model);
$this->model = $model;
}
示例7: __construct
public function __construct(SubdescriptionModel $model)
{
parent::__construct($model);
$this->model = $model;
}
示例8: __construct
public function __construct(CheckOrderModel $model)
{
parent::__construct($model);
$this->model = $model;
}