當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Base_Controller類代碼示例

本文整理匯總了PHP中Base_Controller的典型用法代碼示例。如果您正苦於以下問題:PHP Base_Controller類的具體用法?PHP Base_Controller怎麽用?PHP Base_Controller使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Base_Controller類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('gallery_model', 'gallery_m');
     $assets = array('css' => array(array('url' => 'bootstrap.min.css', 'order' => 0), array('url' => 'gallery.css', 'order' => 1), array('url' => 'portfolio.css', 'order' => 3), array('url' => 'style-shop.css', 'in_footer' => FALSE, 'order' => 2, 'is_cached' => FALSE), array('url' => 'style-layer-slider.css', 'in_footer' => TRUE, 'order' => 4)), 'js' => array(array('url' => 'jquery.min.js', 'order' => 0), array('url' => 'bootstrap.min.js', 'order' => 1), array('url' => 'mysite.js', 'order' => 3), array('url' => 'mysite1.js', 'order' => 2), array('url' => 'mysite2.js', 'in_footer' => FALSE, 'order' => 4)), 'style' => array(array('url' => 'mysite1.js')), 'script' => array(array('url' => 'mysite2.js')));
     $this->theme->enQueueAssets($assets);
 }
開發者ID:nazmulsarkar,項目名稱:ci3-layout-manager,代碼行數:7,代碼來源:Gallery.php

示例2:

 function __construct()
 {
     parent::__construct();
     $this->load->database();
     //載入前台模板
     $this->load->set_front_theme('default');
 }
開發者ID:stoneStyle,項目名稱:startbbs,代碼行數:7,代碼來源:MY_Controller.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->submenu = Navigation::submenu('inventory');
     // Registering unique category validator
     Validator::register('cat_exists', function ($attribute, $value, $parameters) {
         if ($value == 'null') {
             return true;
         }
         $category = DB::table('categories')->where_id($value)->first();
         if ($category !== null) {
             return true;
         }
     });
     // Registering unique item code validator
     Validator::register('code_unique', function ($attribute, $value, $parameters = array()) {
         $id = !empty($parameters) ? $parameters[0] : null;
         $existing_item = DB::table('items')->where_code($value)->first('code');
         if ($existing_item !== null) {
             if ($id === null) {
                 return false;
             }
             $current_item = DB::table('items')->where_id($id)->first('code');
             if ($current_item->code == $value) {
                 return true;
             }
         } elseif ($existing_item == null) {
             return true;
         }
     });
 }
開發者ID:sresoft,項目名稱:noark_simple_inventory,代碼行數:31,代碼來源:item.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->language('welcome');
     $this->template->title('Lex Parser Test');
     $this->registry->set('nav', 'playground/lex');
 }
開發者ID:bhavesh561988,項目名稱:starter-public-edition-4,代碼行數:7,代碼來源:Lex_parser_controller.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->filter('before', 'no_auth')->only(array('new', 'create'));
     $this->filter('before', 'officer_only')->only(array('index', 'show'));
     $this->filter('before', 'vendor_exists')->only(array('show'));
 }
開發者ID:ajb,項目名稱:rfpez,代碼行數:7,代碼來源:vendors.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->filter('before', 'project_exists');
     $this->filter('before', 'i_am_collaborator');
     $this->filter('before', 'deliverable_exists')->only(array('update', 'delete'));
 }
開發者ID:ajb,項目名稱:rfpez,代碼行數:7,代碼來源:deliverables.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->helper('html_filters');
     $this->template->set_partial('ckeditor', 'partials/ckeditor')->set_partial('subnavbar', 'playground/online_editor/subnavbar')->set('subnavbar_item_active', 'user-mode');
     $this->registry->set('nav', 'playground');
 }
開發者ID:Qnatz,項目名稱:starter-public-edition-4,代碼行數:7,代碼來源:User_mode_controller.php

示例8: redirect

 function __construct()
 {
     parent::__construct();
     if (!$this->session->userdata('logged_in')) {
         redirect('/login');
     }
 }
開發者ID:momo7246,項目名稱:Recipe,代碼行數:7,代碼來源:email.php

示例9: __construct

 /**
  * Construct
  */
 public function __construct()
 {
     parent::__construct();
     $this->submenu = Navigation::submenu('inventory');
     // Generating buttons
     $this->item_buttons = Navigation::item_buttons()->add_item_button(array('icon' => 'icon-plus-sign', 'link' => 'contact@add', 'text' => __('site.add_contact')))->get_item_buttons();
 }
開發者ID:sresoft,項目名稱:noark_simple_inventory,代碼行數:10,代碼來源:contact.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->vars = new config_vars();
     $this->vars->load_vars();
     $this->modulo = 'almacen';
     $this->submodulo = 'historial_ajuste';
     $this->seccion = 'ajustes';
     $this->icon = 'fa fa-list';
     //Icono de modulo
     $this->path = $this->modulo . '/' . $this->submodulo . '/';
     //almacen/entradas_recepcion/
     $this->view_content = 'content';
     $this->limit_max = 10;
     $this->offset = 0;
     // Tabs
     $this->tab1 = 'agregar';
     $this->tab2 = 'listado';
     $this->tab3 = 'detalle';
     // DB Model
     $this->load->model($this->modulo . '/' . $this->seccion . '_model', 'db_model');
     $this->load->model($this->modulo . '/catalogos_model', 'catalogos_model');
     $this->load->model('stock_model', 'stock_model');
     // Diccionario
     $this->lang->load($this->modulo . '/' . $this->seccion, "es_ES");
     // Tabs
     $this->tab_inicial = 2;
     $this->tab_indice = array($this->tab1, $this->tab2, $this->tab3);
     for ($i = 0; $i <= count($this->tab_indice) - 1; $i++) {
         $this->tab[$this->tab_indice[$i]] = $this->tab_indice[$i];
     }
 }
開發者ID:minorusal,項目名稱:admin_salon,代碼行數:32,代碼來源:historial_ajuste.php

示例11: index

 public function index()
 {
     if ($this->input->post()) {
         $data['optional'] = $this->input->post('optional');
         $quiz_session_id = $this->quiz_session->insert($data);
         foreach ($this->input->post('answers') as $question_id => $answer) {
             unset($data);
             $data['quiz_session_id'] = $quiz_session_id;
             $data['question_id'] = $question_id;
             if (isset($answer['answer'])) {
                 // Dicertive
                 $data['answer'] = $answer['answer'];
                 $this->response->insert($data);
             } else {
                 // Multichoice
                 $data['choice_id'] = $answer['choice'];
                 $this->response->insert($data);
             }
         }
         exit;
     }
     $questions = $this->question->get_all();
     foreach ($questions as $key => $q) {
         $questions[$key]['choices'] = $this->choice->get_all('', array('question_id' => $q['id']));
         //$questions[$key]['type'] = $this->config->item('questions_type')[$q['type']];
     }
     $this->data['questions'] = $questions;
     $this->layout = $this->config->item('ci_my_admin_template_dir_quiz') . "includes/layout";
     $this->view = $this->config->item('ci_my_admin_template_dir_quiz') . "quiz_index";
     parent::page();
 }
開發者ID:thomasgroch,項目名稱:quiz,代碼行數:31,代碼來源:Quiz.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->helper('html_filters');
     $this->template->append_metadata($this->load->view('partials/ckeditor', null, true))->set_partial('subnavbar', 'playground/online_editor/subnavbar')->set('subnavbar_item_active', 'admin-mode');
     $this->registry->set('nav', 'playground');
 }
開發者ID:patilstar,項目名稱:HMVC-WITH-CI,代碼行數:7,代碼來源:Admin_mode_controller.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     error_reporting(-1);
     ini_set('display_errors', 'On');
     $this->load->library('Buscape_Loader', array('applicationId' => '757347736264524b6936303d'), 'buscape');
 }
開發者ID:jeanmalves,項目名稱:Corre_Dagua,代碼行數:7,代碼來源:Test.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $user_data = $this->session->userdata;
     $this->load->vars($user_data);
     $this->load->model('penetapan_model', 'data_model');
 }
開發者ID:ibnoe,項目名稱:simpatda-thinkfrogs,代碼行數:7,代碼來源:penetapan.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $this->template->title('Assign Rating Example');
     $this->template->set_partial('subnavbar', 'assign_rating_subnavbar')->set('subnavbar_item_active', 'v1');
     $this->registry->set('nav', 'playground');
 }
開發者ID:rhizalpatrax64bit,項目名稱:starter-public-edition-4,代碼行數:7,代碼來源:Assign_rating_controller.php


注:本文中的Base_Controller類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。