本文整理汇总了PHP中BaseController::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseController::__construct方法的具体用法?PHP BaseController::__construct怎么用?PHP BaseController::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseController
的用法示例。
在下文中一共展示了BaseController::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* construct function
*/
public function __construct($controller, $action)
{
parent::__construct($controller, $action);
$um = new UserModel();
$this->user = $um->loadUser();
$this->setView('curUser', $this->user);
}
示例2: __construct
public function __construct()
{
parent::__construct();
$this->instagramModel = new \blogg\model\instagram\InstagramModel($this->settings->getInstagramSettings());
$this->setView(new \blogg\view\instagram\InstagramView());
$this->numberOfImages = $this->settings->getInstagramSettings()->numberOfImages;
}
示例3: __construct
public function __construct()
{
parent::__construct();
$this->check_session();
$this->controllerName = "PuntosVenta";
$this->load->model('common_model');
}
示例4: __construct
public function __construct()
{
parent::__construct();
if (!BEUsersHelper::isAdmin()) {
Redirect::to('/');
}
}
示例5: __construct
public function __construct(PaymentRepository $paymentRepo, InvoiceRepository $invoiceRepo, AccountRepository $accountRepo)
{
parent::__construct();
$this->paymentRepo = $paymentRepo;
$this->invoiceRepo = $invoiceRepo;
$this->accountRepo = $accountRepo;
}
示例6: __construct
public function __construct(AccountRepository $accountRepo, ContactMailer $contactMailer, UserMailer $userMailer)
{
parent::__construct();
$this->accountRepo = $accountRepo;
$this->contactMailer = $contactMailer;
$this->userMailer = $userMailer;
}
示例7: __construct
/**
* FlightsController constructor.
*/
public function __construct()
{
parent::__construct('Flight');
/* Template & Navbar par default */
$this->dsp->template = 'layouts.templates.manager';
return true;
}
示例8: __construct
public function __construct($request, $response)
{
/*{{{*/
parent::__construct($request, $response);
$response->module = Space::MODULE_THREAD;
$response->unDisplaySubMenu = true;
}
示例9: __construct
public function __construct()
{
parent::__construct();
$this->seo_set();
$this->docModel = M('Document');
$this->model = D('Store');
}
示例10: __construct
public function __construct(Vocabulary $vocabulary)
{
parent::__construct();
$this->vocabulary = $vocabulary;
$this->route_prefix = rtrim(Config::get('taxonomy::route_prefix'), '.') . '.';
View::composer('taxonomy::*', 'Devfactory\\Taxonomy\\Composers\\TaxonomyComposer');
}
示例11: __construct
/**
* Create a new API User controller.
*
* @param UserRepositoryInterface $users
*
* @return ApiUserController
*/
public function __construct(UserRepositoryInterface $users)
{
parent::__construct();
$this->users = $users;
$this->beforeFilter('auth');
$this->beforeFilter('csrf_header', array('only' => array('store', 'update', 'destroy')));
}
示例12: __construct
public function __construct(IRetailerRepository $retailer)
{
parent::__construct();
$this->adminId = Auth::id();
$this->address = new Address();
$this->retailer = $retailer;
}
示例13: __construct
public function __construct($id, $module = null)
{
parent::__construct($id, $module);
// If there is a post-request, redirect the application to the provided url of the selected language
if (isset($_POST['language'])) {
$lang = $_POST['language'];
$MultilangReturnUrl = $_POST[$lang];
$this->redirect($MultilangReturnUrl);
}
// Set the application language if provided by GET, session or cookie
if (isset($_GET['language'])) {
Yii::app()->language = $_GET['language'];
Yii::app()->user->setState('language', $_GET['language']);
$cookie = new CHttpCookie('language', $_GET['language']);
$cookie->expire = time() + 60 * 60 * 24 * 365;
// (1 year)
Yii::app()->request->cookies['language'] = $cookie;
$_COOKIE['language'] = Yii::app()->request->cookies['language']->value;
} else {
if (Yii::app()->user->hasState('language')) {
Yii::app()->language = Yii::app()->user->getState('language');
} else {
if (isset(Yii::app()->request->cookies['language'])) {
Yii::app()->language = Yii::app()->request->cookies['language']->value;
}
}
}
if ($_POST['server']) {
$url = str_ireplace($_COOKIE['server'], $_POST['server'], Yii::app()->request->requestUri);
Yii::app()->request->cookies['server'] = new CHttpCookie('server', strtolower($_POST['server']));
$this->redirect($url);
}
}
示例14: __construct
public function __construct()
{
parent::__construct();
$this->load->model('admin/info_model');
$this->lang->load('common', $this->session->userdata('lang_file'));
$this->siteTitle = 'Account Soft | ';
}
示例15:
function __construct()
{
parent::__construct();
$this->data['layout'] = 'adminhtml';
$this->data['header'] = 'Data Jurnal Mahasiswa';
//$this->helper('Data');
}