当前位置: 首页>>代码示例>>PHP>>正文


PHP Controller::__construct方法代码示例

本文整理汇总了PHP中Controller::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller::__construct方法的具体用法?PHP Controller::__construct怎么用?PHP Controller::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Controller的用法示例。


在下文中一共展示了Controller::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 function __construct()
 {
     global $basePath;
     $respons = array();
     parent::__construct();
     $parts = $this->getUrlParts();
     $this->startSession();
     $this->auth($parts[3]);
     if ($parts[4] === "schema") {
         $dir = $basePath . "tmp/" . $parts[3] . "/" . $parts[5] . ".*";
         //echo $dir;
     } else {
         $dir = $basePath . "tmp/" . $parts[3] . "/" . $parts[4];
     }
     $dir = str_replace("..", "", $dir);
     //$dirReal = realpath($dir); // Do not work on *
     if ($dir) {
         exec("rm -R {$dir}");
         $respons['success'] = true;
         $respons['message'] = "Tile cache invalidated";
     } else {
         $respons['success'] = false;
         $respons['message'] = "No tile cache to invalidate.";
     }
     echo $this->toJSON($respons);
 }
开发者ID:valentijnvenus,项目名称:geocloud,代码行数:26,代码来源:ClearTileCache_c.php

示例2: __construct

 public function __construct($module = null, $action = null)
 {
     parent::__construct($module, $action);
     $this->_templateobject = new TicketAttachment();
     $this->uses($this->_templateobject);
     $this->view->set('controller', 'Attachments');
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:7,代码来源:AttachmentsController.php

示例3: mandroid

 function __construct()
 {
     parent::__construct($this->params);
     $this->conf = Registry::getInstance();
     $this->model = new mandroid();
     $this->view = new vandroid();
 }
开发者ID:adrisnz,项目名称:projectefinal,代码行数:7,代码来源:android.php

示例4:

 function __construct($Request)
 {
     parent::__construct($Request);
     $this->addActionHandler('index', 'doIndex');
     $this->addActionHandler('delete', 'doDelete');
     $this->addActionHandler('install', 'doSave');
 }
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:7,代码来源:skin.php

示例5:

 function __construct()
 {
     parent::__construct();
     // Instantiate content model
     $this->loadModel('content', false);
     $this->contentModel = new Content_Model();
 }
开发者ID:spelgrift,项目名称:imageman,代码行数:7,代码来源:page.php

示例6:

 function __construct()
 {
     parent::__construct();
     if (Session::get('user_login')) {
         echo '<script type="text/javascript"> window.location.replace("' . URL . 'dashboard") </script>';
     }
 }
开发者ID:shaunzeng,项目名称:a-mvc-boilerplate-written-in-php,代码行数:7,代码来源:login.php

示例7: __construct

 public function __construct()
 {
     if ($this->resource_type == null) {
         throw new Exception("@todo ERROR_MISSING_RESOURCE_TYPE");
     }
     parent::__construct();
 }
开发者ID:Juuro,项目名称:Dreamapp-Website,代码行数:7,代码来源:rest.php

示例8: __construct

 public function __construct($id, $module = null)
 {
     parent::__construct($id, $module);
     if ($this->_facebook === null) {
         $this->_facebook = new Facebook(array('appId' => Yii::app()->params['fbAppId'], 'secret' => Yii::app()->params['fbAppSecret'], 'cookie' => true));
     }
 }
开发者ID:ChinHui-Chen,项目名称:newssip,代码行数:7,代码来源:SiteController.php

示例9: __construct

 public function __construct($module = null, $action = null)
 {
     parent::__construct($module, $action);
     $this->_templateobject = DataObjectFactory::Factory('ModuleComponent');
     $this->uses('ModuleDefault', false);
     $this->uses($this->_templateobject);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:7,代码来源:ModulecomponentsController.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     Config::set('auth.driver', 'adminauth');
     Asset::add('bootstrap', 'bundles/adminify/css/bootstrap.min.css');
     Asset::add('style', 'bundles/adminify/css/style.css');
 }
开发者ID:SerdarSanri,项目名称:Adminify,代码行数:7,代码来源:loginbase.php

示例11: __construct

 public function __construct($request = null, $response = null)
 {
     if (CAKEAPP_ENV == 'development') {
         $this->components['DebugKit.Toolbar'] = array();
     }
     parent::__construct($request, $response);
 }
开发者ID:songphi,项目名称:cakeapp,代码行数:7,代码来源:AppController.php

示例12: __construct

 public function __construct($request, $response)
 {
     /*{{{*/
     parent::__construct($request, $response);
     $clients = array('auditorClient', 'threadCateClient', 'userClient', 'spaceClient', 'doctorClient', 'hospitalClient', 'hospitalFacultyClient', 'PatientClient', 'DoctorPatientPostClient', 'inspectClient');
     foreach ($clients as $client) {
         $this->{$client} = new ClientProxy($client);
     }
     $userId = UserClient::getInstance()->getCheckedSeed('id');
     if ($userId) {
         $this->curUser = DAL::get()->find('user', $userId);
     } else {
         $this->curUser = new NullEntity();
     }
     $response->curUser = $this->curUser;
     $response->staticUrl = 'http://i1.hdfimg.com/in/case';
     $response->leftWidth = '40%';
     //$response->leftWidth = '43%';
     $response->controller = $request->controller;
     $response->action = $request->action;
     $response->showContent = $request->showContent;
     $this->user = $response->user;
     $this->curInspector = $response->curInspector;
     $this->auditor = $response->auditor;
     if (false == $this->auditor instanceof Auditor) {
         $auditor = $this->curInspector->getAuditorEntity4auditfront();
         $this->auditor = $auditor;
     }
     $response->args = array();
     $response->isAjax = $request->ajax_status;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:basecontroller.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     if (isset($_GET['f']) and !empty($_GET['f']) and $_GET['f'] != 'show' and $_GET['f'] != 'showOneGroup' and $_GET['f'] != 'showOneTeacher' and $_GET['f'] != 'showOneRoom' and $_GET['f'] != 'checkTitle' and $_GET['f'] != 'checkTeachers' and $_GET['f'] != 'checkRoom' and $_GET['f'] != 'create_comm' and $_GET['f'] != 'create_comm_teacher' and $_GET['f'] != 'check_create_comm' and $_GET['f'] != 'heck_create_comm_teacher' and $_GET['f'] != 'delete') {
         header("Location: " . URL . '?c=showTimeTable&f=show');
     }
 }
开发者ID:olehpitsun,项目名称:duplom.comv2.2.1,代码行数:7,代码来源:showTimeTableController.php

示例14: __construct

 public function __construct($registry)
 {
     parent::__construct($registry);
     Journal2DBUpgrade::check();
     if (isset($this->request->server['HTTPS']) && ($this->request->server['HTTPS'] == 'on' || $this->request->server['HTTPS'] == '1')) {
         $this->data['base'] = HTTPS_CATALOG;
     } else {
         $this->data['base'] = HTTP_CATALOG;
     }
     $this->data['base_href'] = $this->url->link('module/journal2', 'token=' . $this->session->data['token'], 'SSL');
     $this->data['export_href'] = $this->url->link('module/journal2/rest/data/export', 'token=' . $this->session->data['token'], 'SSL');
     $this->data['import_href'] = $this->url->link('tool/backup', 'token=' . $this->session->data['token'], 'SSL');
     $this->data['export_csv'] = $this->url->link('module/journal2/rest/newsletter/export_csv', 'token=' . $this->session->data['token'], 'SSL');
     $this->data['transition_gallery_href'] = $this->url->link('module/journal2/transition_gallery', 'token=' . $this->session->data['token'], 'SSL');
     $this->data['journal2_config'] = array();
     $this->data['journal2_config']['token'] = $this->session->data['token'];
     $this->data['journal2_config']['version'] = defined('JOURNAL_VERSION') ? JOURNAL_VERSION : null;
     $this->data['journal2_config']['user_id'] = $this->user->getId();
     $this->data['journal2_config']['items_per_page'] = 20;
     if (!property_exists('Front', 'IS_OC2')) {
         echo '
             <h3>Journal Installation Error</h3>
             <p>Make sure you have uploaded all Journal files to your server and successfully replaced <b>system/engine/front.php</b> file.</p>
             <p>You can find more information <a href="http://docs.digital-atelier.com/opencart/journal/#/settings/install" target="_blank">here</a>.</p>
         ';
         exit;
     }
     $this->data['journal2_config']['oc2'] = Front::$IS_OC2;
 }
开发者ID:SwayWebStudio,项目名称:night.com,代码行数:29,代码来源:journal2.php

示例15: __construct

 public function __construct($id, $module = null)
 {
     if (Yii::app()->request->isAjaxRequest) {
         $this->layout = false;
     }
     parent::__construct($id, $module);
 }
开发者ID:cebe,项目名称:chive,代码行数:7,代码来源:InformationController.php


注:本文中的Controller::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。