当前位置: 首页>>代码示例>>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;未经允许,请勿转载。