• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ApplicationController类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getInstance

 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new ApplicationController();
     }
     return self::$instance;
 }
开发者ID:nathanfl,项目名称:medtele,代码行数:7,代码来源:Application.Controller.php


示例2:

 /**
  * Constructor
  *
  * @param Request $request
  * @return MobileAccessController extends ApplicationController 
  */
 function __construct($request)
 {
     parent::__construct($request);
     $this->mobile_device = mobile_access_module_get_compatible_device(USER_AGENT);
     $this->setLayout(array('module' => MOBILE_ACCESS_MODULE, 'layout' => 'wireframe'));
     // assign variables to smarty
     $this->smarty->assign(array("mobile_device" => $this->mobile_device, "module_assets_url" => get_asset_url('modules/' . $this->active_module)));
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:14,代码来源:MobileAccessController.class.php


示例3:

	/**
	 * Construct the ApplicationController
	 *
	 * @param void
	 * @return ApplicationController
	 */
	function __construct() {
		parent::__construct();
		prepare_company_website_controller($this, 'website');

		// Access permissios
		if(!can_manage_configuration(logged_user())) {
			flash_error(lang('no access permissions'));
			ajx_current("empty");
		} // if
	} // __construct
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:16,代码来源:ConfigController.class.php


示例4: showAll

 function showAll()
 {
     if (!$this->isCached()) {
         $ctrl =& ApplicationController::getInstance();
         $o_lang = $ctrl->getLang();
         $this->tpl->assign("link_forums", HREF_FORUMS);
         $this->tpl->assign("translators_array", $o_lang->getArrayTranslators());
     }
     $this->display();
 }
开发者ID:ber5ien,项目名称:www.jade-palace.co.uk,代码行数:10,代码来源:Contacts.class.php


示例5: showAll

 function showAll()
 {
     if (!$this->isCached()) {
         $ctrl =& ApplicationController::getInstance();
         $o_lang = $ctrl->getLang();
         $this->tpl->assign("link_doc", array(HREF_DOC_OPEN, HREF_DOC_CLOSE));
         $this->tpl->assign("translators_array", $o_lang->getArrayTranslators());
     }
     $this->display();
 }
开发者ID:ber5ien,项目名称:www.jade-palace.co.uk,代码行数:10,代码来源:OtherLanguage.class.php


示例6: beforeInitialize

 function beforeInitialize()
 {
     parent::beforeInitialize();
     if ($_SESSION['isTestMode']) {
         $this->redirect('index.php', 'Sorry... PBXww is working only in production mode', 'danger');
     }
 }
开发者ID:didww,项目名称:demo,代码行数:7,代码来源:pbxww.php


示例7:

	/**
	 * Construct the AccountController
	 *
	 * @access public
	 * @param void
	 * @return AccountController
	 */
	function __construct() {
		parent::__construct();
		prepare_company_website_controller($this, 'website');
		if (array_var($_GET, 'current') != 'administration') {
			ajx_set_panel("account");
		}
	} // __construct
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:14,代码来源:AccountController.class.php


示例8: die

 /**
  * Constructor method
  *
  * @param string $request
  * @return StatusController
  */
 function __construct($request)
 {
     parent::__construct($request);
     if (!$this->logged_user->isAdministrator() && !$this->logged_user->getSystemPermission('can_use_status_updates')) {
         if ($this->request->getAction() == 'count_new_messages') {
             die('0');
         } else {
             $this->httpError(HTTP_ERR_FORBIDDEN);
         }
         // if
     }
     // if
     $this->wireframe->addBreadCrumb(lang('Status'), assemble_url('status_updates'));
     $status_update_id = (int) $this->request->get('status_update_id');
     if ($status_update_id) {
         $this->active_status_update = StatusUpdates::findById($status_update_id);
     }
     // if
     if (instance_of($this->active_status_update, 'StatusUpdate')) {
         $this->wireframe->addBreadCrumb(lang('Status Update #:id', array('id' => $this->active_status_update->getId())), $this->active_status_update->getViewUrl());
     } else {
         $this->active_status_update = new StatusUpdate();
     }
     // if
     $this->smarty->assign(array('active_status_update' => $this->active_status_update, 'add_status_message_url' => assemble_url('status_updates_add')));
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:32,代码来源:StatusController.class.php


示例9: TimeReport

 /**
  * Constructor
  *
  * @param Request $request
  * @return PeopleController
  */
 function __construct($request)
 {
     parent::__construct($request);
     if (!$this->logged_user->isAdministrator() && !$this->logged_user->getSystemPermission('use_time_reports')) {
         $this->httpError(HTTP_ERR_FORBIDDEN);
     }
     // if
     $this->wireframe->addBreadCrumb(lang('Time'), assemble_url('global_time'));
     if (TimeReport::canAdd($this->logged_user)) {
         $this->wireframe->addPageAction(lang('New Report'), assemble_url('global_time_report_add'));
     }
     // if
     $report_id = $this->request->getId('report_id');
     if ($report_id) {
         $this->active_report = TimeReports::findById($report_id);
     }
     // if
     if (instance_of($this->active_report, 'TimeReport')) {
         $this->wireframe->addBreadCrumb($this->active_report->getName(), $this->active_report->getUrl());
     } else {
         $this->active_report = new TimeReport();
     }
     // if
     $this->wireframe->current_menu_item = 'time';
     $this->smarty->assign('active_report', $this->active_report);
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:32,代码来源:GlobalTimetrackingController.class.php


示例10: trace

 /**
  * Construct controller and check if we have logged in user
  *
  * @param void
  * @return null
  */
 function __construct()
 {
     trace(__FILE__, '__construct() - begin');
     parent::__construct();
     trace(__FILE__, '__construct() - prepare_company_website_controller');
     prepare_company_website_controller($this, 'dashboard');
 }
开发者ID:federosky,项目名称:ProjectPier-Core,代码行数:13,代码来源:DashboardController.class.php


示例11:

 /**
  * Construct the MailController
  *
  * @access public
  * @param void
  * @return MailController
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'website');
     Env::useHelper('MailUtilities.class', $this->plugin_name);
     require_javascript("AddMail.js", $this->plugin_name);
 }
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:14,代码来源:MailController.class.php


示例12: controller_global

 public function controller_global()
 {
     $this->body_id = parent::get_body_id();
     $this->body_class = parent::get_body_class();
     $this->flickr = new Flickr($this->flickr_secret_key, true);
     $this->section_stack[0] = "gallery";
 }
开发者ID:sheldon,项目名称:charlesmarshall,代码行数:7,代码来源:GalleryController.php


示例13:

	/**
	 * Construct the FilesController
	 *
	 * @access public
	 * @param void
	 * @return FilesController
	 */
	function __construct() {
		parent::__construct();
		
		$protocol = (strpos($_SERVER['SERVER_PROTOCOL'], 'HTTPS')) ? 'https' : 'http';
		
		prepare_company_website_controller($this, 'website');
	} // __construct
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:14,代码来源:FilesController.class.php


示例14: init

 public function init()
 {
     parent::init();
     $this->getView()->breadcrumb[] = array('Home', array('module' => 'admin', 'controller' => 'index', 'action' => 'index'));
     $this->getView()->setLayout('default');
     $this->getView()->setScriptPath(APPLICATION_PATH . DS . 'modules' . DS . 'Admin' . DS . 'views');
     //$this->getView()->assign('breadcrumb', $this->breadcrumb);
 }
开发者ID:hexing-w,项目名称:Yaf-CMS,代码行数:8,代码来源:Admin.php


示例15:

 /**
  * Construct API controller
  *
  * @param Request $request
  * @return ApiController
  */
 function __construct($request)
 {
     parent::__construct($request);
     if (!$this->request->isApiCall()) {
         $this->httpError(HTTP_ERR_BAD_REQUEST);
     }
     // if
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:14,代码来源:ApiController.class.php


示例16: __construct

 public function __construct()
 {
     parent::__construct();
     // erm ...
     if ($this->picnic()->router()->outputType() == "html") {
         $this->picnic()->router()->outputType("xml");
     }
 }
开发者ID:sixones,项目名称:nzbvr,代码行数:8,代码来源:class.api.php


示例17: controller_global

 public function controller_global()
 {
     WaxEvent::add("cms.cms_stack_set", function () {
         $obj = WaxEvent::data();
         array_unshift($obj->cms_stack, $obj->controller);
     });
     parent::controller_global();
 }
开发者ID:phpwax,项目名称:wildfire.events,代码行数:8,代码来源:WildfireEventsController.php


示例18:

 function before_action()
 {
     parent::before_action();
     $this->current_user = User::find($_SESSION['user_id']);
     if (!$this->current_user) {
         $this->redirect('/');
     }
 }
开发者ID:hugoabonizio,项目名称:GaiaPDTI,代码行数:8,代码来源:authenticate_controller.php


示例19: beforeDisplay

 public function beforeDisplay()
 {
     $breadcrumb_view = view('pxl::layouts/dashboard/partials/breadcrumb');
     $breadcrumb_view->breadcrumb_items = $this->breadcrumb_items;
     $breadcrumb_view->num_breadcrumb_items = count($this->breadcrumb_items);
     $this->assign('breadcrumb', $breadcrumb_view->render(), self::SECTION_LAYOUT);
     parent::beforeDisplay();
 }
开发者ID:pxlbros,项目名称:pxlframework,代码行数:8,代码来源:DashboardController.php


示例20: trace

 function __construct()
 {
     trace(__FILE__, '__construct()');
     parent::__construct();
     trace(__FILE__, '__construct() - prepare_company_website_controller');
     prepare_company_website_controller($this, 'project_website');
     trace(__FILE__, '__construct() - add textile');
     $this->addHelper('textile');
 }
开发者ID:bklein01,项目名称:Project-Pier,代码行数:9,代码来源:WikiController.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ApplicationException类代码示例发布时间:2022-05-23
下一篇:
PHP ApplicationBase类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap