本文整理汇总了PHP中Public_Controller::Public_Controller方法的典型用法代码示例。如果您正苦于以下问题:PHP Public_Controller::Public_Controller方法的具体用法?PHP Public_Controller::Public_Controller怎么用?PHP Public_Controller::Public_Controller使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Public_Controller
的用法示例。
在下文中一共展示了Public_Controller::Public_Controller方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor method
* @access public
* @return void
*/
public function __construct()
{
parent::Public_Controller();
$this->config->load('paypal_constants');
$this->load->model('orders_m');
$this->load->model('checkout_m');
}
示例2: __construct
/**
* Constructor method
*
* @access public
* @return void
*/
public function __construct()
{
// Call the parent's constructor method
parent::Public_Controller();
// Load the required classes
$this->load->model('users_m');
$this->load->model('profile_m');
$this->load->helper('user');
$this->load->helper('date');
$this->lang->load('user');
$this->lang->load('profile');
$this->load->library('form_validation');
// Validation rules - git is really pissing me off right now
$this->validation_rules = array(array('field' => 'display_name', 'label' => lang('profile_display'), 'rules' => 'required|trim|alphanumeric'), array('field' => 'gender', 'label' => lang('profile_gender'), 'rules' => 'trim|max_length[1]'), array('field' => 'dob_day', 'label' => lang('profile_dob_day'), 'rules' => 'trim|numeric|required'), array('field' => 'dob_month', 'label' => lang('profile_dob_month'), 'rules' => 'trim|numeric|required'), array('field' => 'dob_year', 'label' => lang('profile_dob_year'), 'rules' => 'trim|numeric|required'), array('field' => 'bio', 'label' => lang('profile_bio'), 'rules' => 'trim|max_length[1000]'), array('field' => 'phone', 'label' => lang('profile_phone'), 'rules' => 'trim|alpha_numeric|max_length[20]'), array('field' => 'mobile', 'label' => lang('profile_mobile'), 'rules' => 'trim|alpha_numeric|max_length[20]'), array('field' => 'address_line1', 'label' => lang('profile_address_line1'), 'rules' => 'trim'), array('field' => 'address_line2', 'label' => lang('profile_address_line2'), 'rules' => 'trim'), array('field' => 'address_line3', 'label' => lang('profile_address_line3'), 'rules' => 'trim'), array('field' => 'postcode', 'label' => lang('profile_postcode'), 'rules' => 'trim|max_length[20]'), array('field' => 'msn_handle', 'label' => lang('profile_msn_handle'), 'rules' => 'trim|valid_email'), array('field' => 'aim_handle', 'label' => lang('profile_aim_handle'), 'rules' => 'trim|alpha_numeric'), array('field' => 'yim_handle', 'label' => lang('profile_yim_handle'), 'rules' => 'trim|alpha_numeric'), array('field' => 'gtalk_handle', 'label' => lang('profile_gtalk_handle'), 'rules' => 'trim|valid_email'), array('field' => 'gravatar', 'label' => lang('profile_gravatar'), 'rules' => 'trim|valid_email'));
// Set the validation rules
$this->form_validation->set_rules($this->validation_rules);
// If profiles are not enabled, pretend they don't exist
if (!$this->settings->item('enable_profiles')) {
show_404();
}
// Get the user ID, if it exists
if ($user = $this->ion_auth->get_user()) {
$this->user_id = $user->id;
}
// The user is not logged in, send them to login page
if (!$this->ion_auth->logged_in()) {
redirect('users/login');
}
}
示例3: array
function __construct()
{
parent::Public_Controller();
$this->lang->load('contact');
$this->subjects = array('support' => lang('subject_support'), 'sales' => lang('subject_sales'), 'payments' => lang('subject_payments'), 'business' => lang('subject_business'), 'feedback' => lang('subject_feedback'), 'other' => lang('subject_other'));
$this->rules = array(array('field' => 'contact_name', 'label' => lang('contact_name_label'), 'rules' => 'required|trim|max_length[80]'), array('field' => 'contact_email', 'label' => lang('contact_email_label'), 'rules' => 'required|trim|valid_email|max_length[80]'), array('field' => 'company_name', 'label' => lang('contact_company_name_label'), 'rules' => 'trim|max_length[80]'), array('field' => 'subject', 'label' => lang('contact_subject_label'), 'rules' => 'required|trim'), array('field' => 'message', 'label' => lang('contact_message_label'), 'rules' => 'required'));
}
示例4: header
function __construct()
{
parent::Public_Controller();
if (!$this->data->user === FALSE) {
header('Location: ' . $this->config->item('base_url') . 'admin');
}
}
示例5:
function __construct()
{
parent::Public_Controller();
$this->load->library('validation');
$this->load->model('comments_m');
$this->lang->load('comments');
}
示例6: __construct
public function __construct()
{
parent::Public_Controller();
$this->config->load('files');
$this->_path = FCPATH . $this->config->item('files_folder') . DIRECTORY_SEPARATOR;
}
示例7:
function __construct()
{
parent::Public_Controller();
$this->load->model('news_m');
$this->load->helper('xml');
$this->load->helper('date');
}
示例8: auth
/**
* Constructor
*/
function auth()
{
parent::Public_Controller();
// Load the Auth_form_processing class
$this->load->library('auth_form_processing');
log_message('debug', 'BackendPro : Auth class loaded');
}
示例9:
function __construct()
{
parent::Public_Controller();
$this->load->library('user_lib');
$this->load->model('users_m');
$this->load->helper('user');
$this->lang->load('user');
}
示例10:
function __construct()
{
parent::Public_Controller();
$this->load->model('photos_m');
$this->load->model('photo_albums_m');
$this->lang->load('photos');
$this->lang->load('photo_albums');
}
示例11: __construct
public function __construct()
{
parent::Public_Controller();
$this->load->model('portfolio_m');
$this->load->helper('xml');
$this->load->helper('date');
$this->lang->load('portfolio');
}
示例12:
function __construct()
{
parent::Public_Controller();
$this->load->library('session');
$this->user_id = $this->session->userdata('user_id');
$this->load->model('users_m');
$this->load->helper('user');
$this->lang->load('user');
}
示例13: __construct
public function __construct()
{
parent::Public_Controller();
$this->load->model('blog_m');
$this->load->model('blog_categories_m');
$this->load->model('comments/comments_m');
$this->load->helper('text');
$this->lang->load('blog');
}
示例14: __construct
/**
* Constructor method
* @access public
* @return void
*/
public function __construct()
{
parent::Public_Controller();
// Load the required classes
$this->load->library('form_validation');
$this->load->model('comments_m');
$this->lang->load('comments');
}
示例15:
function __construct()
{
parent::Public_Controller();
$this->load->model('news_m');
$this->load->module_model('categories', 'categories_m');
$this->load->module_model('comments', 'comments_m');
$this->load->helper('text');
// All pages within news will display an archive list
$this->data->archive_months = $this->news_m->getArchiveMonths();
}