本文整理汇总了PHP中Public_Controller::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Public_Controller::__construct方法的具体用法?PHP Public_Controller::__construct怎么用?PHP Public_Controller::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Public_Controller
的用法示例。
在下文中一共展示了Public_Controller::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Every time this controller is called should:
*/
public function __construct()
{
parent::__construct();
$this->lang->load("home");
$this->config->load("tdesign");
$this->load->helper(array("currency", "tdesign"));
}
示例2: __construct
public function __construct()
{
parent::__construct();
$this->load->model('shop_cat_m');
$this->load->model('shop_items_m');
$this->load->model('cart_m');
$this->load->model('galleries/galleries_m');
$this->load->model('galleries/gallery_images_m');
$this->lang->load('shop');
$this->load->library('cart');
$this->load->library('form_validation');
$this->cart_validation_rules = array(
array(
'field' => 'qty[]',
'label' => 'lang:shop.qty_label',
'rules' => 'trim|required|numeric'
),
array(
'field' => 'rowid[]',
'label' => 'hidden',
'rules' => 'required'
)
);
$this->add_to_cart_rules = array(
array(
'field' => 'item_options[]',
'label' => 'lang:shop.item_options_label',
'rules' => 'trim'
)
);
}
示例3:
function __construct()
{
parent::__construct();
$this->folder = "admin/";
$this->module = $this->folder . "error/";
$this->http_ref = base_url() . $this->module;
}
示例4: __construct
public function __construct()
{
parent::__construct();
$this->load->model('newsletters_m');
$this->load->model('subscribers_m');
$this->lang->load('newsletter');
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->load->model('Gallery_model');
$this->load->helper(['url', 'html', 'form']);
$this->load->library(['form_validation', 'session']);
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->load->model('Post');
$this->load->model('Category');
$this->load->model('Tag');
}
示例7:
function __construct()
{
parent::__construct();
$this->load->model(array('m_profiles', 'm_posts', 'm_projects', 'm_blogs', 'm_reviews', 'm_videos', 'm_accounts', 'm_comments', 'm_threads', 'm_banners', 'm_stats'));
$this->load->helper(array('pretty_date'));
$this->load->vars(array('active' => 'home'));
}
示例8: __construct
/**
* The constructor
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
$this->data = new stdClass();
$this->lang->load('testimonials');
$this->load->driver('Streams');
}
示例9:
function __construct()
{
parent::__construct();
$this->load->library('ion_auth');
$this->load->library('postal');
$this->load->helper('url');
}
示例10: __construct
public function __construct()
{
parent::__construct();
$this->load->model('home_model');
$this->load->library('pagination');
$this->load->library('facebook');
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->load->library('facebook');
$this->load->library('gr_auth', IMS_DB_PREFIX . 'customer');
$this->load->model(['user_home_model', 'event_public/event_public_model', 'rating/rating_model']);
}
示例12: redirect
function __construct()
{
parent::__construct();
$this->load->library("go_cart");
$this->load->helper('currency');
$this->lang->load(array("cart"));
$this->load->model(array("location_model"));
/*make sure the cart isnt empty*/
if ($this->go_cart->total_items() == 0) {
redirect('home');
}
/*is the user required to be logged in?*/
if (config_item('require_login')) {
$this->Customer_model->is_logged_in('checkout');
}
if (!config_item('allow_os_purchase') && config_item('inventory_enabled')) {
/*double check the inventory of each item before proceeding to checkout*/
$inventory_check = $this->go_cart->check_inventory();
if ($inventory_check) {
/*
OOPS we have an error. someone else has gotten the scoop on our customer and bought products out from under them!
we need to redirect them to the view cart page and let them know that the inventory is no longer there.
*/
$this->session->set_flashdata('error', $inventory_check);
redirect('cart/view_cart');
}
}
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
$this->load->library('form_validation');
}
示例13: __construct
public function __construct()
{
parent::__construct();
$this->config->load('files/files');
$this->load->library('files/files');
$this->_path = FCPATH . rtrim($this->config->item('files:path'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
}
示例14:
function __construct()
{
parent::__construct();
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
//$this->load->library('security');
}
示例15: __construct
public function __construct()
{
parent::__construct();
$this->lang->load('portfolio');
$this->load->model('portfolio/portfolio_m');
$this->template->append_css('module::portfolio.css')->append_js('module::jquery.quicksand.js')->append_js('module::portfolio.js');
}