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


PHP use_controller函数代码示例

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


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

示例1: execute_action

/**
 * Contruct controller and execute specific action
 *
 * @param Request $request
 * @return null
 * @throws ControllerDnxError
 * @throws InvalidControllerActionError
 */
function execute_action($request)
{
    $controller_name = $request->getController();
    // we'll use this a lot
    $use_controller = use_controller($controller_name, $request->getModule());
    if (is_error($use_controller)) {
        return $use_controller;
    }
    // if
    $controller_class = get_controller_class($controller_name);
    if (!class_exists($controller_class)) {
        use_error('ControllerDnxError');
        return new ControllerDnxError($controller_name);
    }
    // if
    $controller = new $controller_class($request);
    if (!instance_of($controller, 'Controller')) {
        use_error('ControllerDnxError');
        return new ControllerDnxError($controller_name);
    }
    // if
    return $controller->execute($request->getAction());
}
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:environment.php

示例2: use_controller

<?php

// Interit administration controller
use_controller('admin', SYSTEM_MODULE);
/**
 * Modules administration controller
 *
 * @package activeCollab.modules.system
 * @subpackage controllers
 */
class ModulesAdminController extends AdminController
{
    /**
     * Name of this controller (underscore)
     *
     * @var string
     */
    var $controller_name = 'modules_admin';
    /**
     * Selected module
     *
     * @var Module
     */
    var $active_module;
    /**
     * Constructor
     *
     * @param Request $request
     * @return ModulesAdminController
     */
    function __construct($request)
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:ModulesAdminController.class.php

示例3: use_controller

<?php

// We need projects controller
use_controller('application', SYSTEM_MODULE);
/**
 * Incoming Mail Frontend controller
 *
 * @package activeCollab.modules.incoming_mail
 * @subpackage controllers
 */
class IncomingMailFrontendController extends ApplicationController
{
    /**
     * Active module
     *
     * @var string
     */
    var $active_module = INCOMING_MAIL_MODULE;
    /**
     * Controller name
     *
     * @var string
     */
    var $controller_name = 'incoming_mail_frontend';
    /**
     * Active incoming mail
     *
     * @var IncomingMail
     */
    var $active_mail;
    /**
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:IncomingMailFrontendController.class.php

示例4: use_controller

<?php

// Use assignments controller
use_controller('assignments', RESOURCES_MODULE);
/**
 * Assignment filters controler
 *
 * @package activeCollab.modules.resources
 * @subpackage controllers
 */
class AssignmentFiltersController extends AssignmentsController
{
    /**
     * PHP4 friendly controller name
     *
     * @var string
     */
    var $controller_name = 'assignment_filters';
    /**
     * Construct filters controller
     *
     * @param Request $request
     * @return AssignmentFiltersController
     */
    function __construct($request)
    {
        parent::__construct($request);
        if ($this->active_filter->isLoaded() && $this->request->getAction() != 'add') {
            $this->wireframe->addBreadCrumb($this->active_filter->getName(), $this->active_filter->getUrl());
        }
        // if
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:AssignmentFiltersController.class.php

示例5: use_controller

<?php

// We need MobileAccessProjectController
use_controller('mobile_access_project', MOBILE_ACCESS_MODULE);
/**
 * Mobile Access Project Tickets controller
 *
 * @package activeCollab.modules.mobile_access
 * @subpackage controllers
 */
class MobileAccessProjectTicketsController extends MobileAccessProjectController
{
    /**
     * Controller name
     *
     * @var string
     */
    var $controller_name = 'mobile_access_project_tickets';
    /**
     * Active ticket (if exists)
     *
     * @var Ticket
     */
    var $active_ticket;
    /**
     * Constructor
     *
     * @param Request $request
     * @return MobileAccessController extends ApplicationController 
     */
    function __construct($request)
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:MobileAccessProjectTicketsController.class.php

示例6: use_controller

<?php

// Extend modules admin
use_controller('modules_admin', SYSTEM_MODULE);
/**
 * Status module admin controller
 *
 * @package activeCollab.modules.status
 * @subpackage controllers
 */
class StatusModuleAdminController extends ModulesAdminController
{
    /**
     * Controller name
     *
     * @var string
     */
    var $controller_name = 'status_module_admin';
    /**
     * Show module details page
     *
     * @param void
     * @return null
     */
    function module()
    {
        $this->smarty->assign('roles', Roles::findSystemRoles());
    }
}
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:29,代码来源:StatusModuleAdminController.class.php

示例7: use_controller

<?php

// Extend company profile
use_controller('companies', SYSTEM_MODULE);
/**
 * Company invoices controller implementation
 *
 * @package activeCollab.modules.invoicing
 * @subpackage controllers
 */
class CompanyInvoicesController extends CompaniesController
{
    /**
     * Controller name
     *
     * @var string
     */
    var $controller_name = 'company_invoices';
    /**
     * Selected invoice
     *
     * @var Invoice
     */
    var $active_invoice;
    /**
     * Construct company invoices controller
     *
     * @param Request $request
     * @return CompanyInvoicesController
     */
    function __construct($request)
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:CompanyInvoicesController.class.php

示例8: use_controller

<?php

// Build on top of administration controller
use_controller('settings', SYSTEM_MODULE);
/**
 * Manage email settings
 *
 * @package activeCollab.modules.system
 * @subpackage controllers
 */
class EmailTemplatesAdminController extends SettingsController
{
    /**
     * Controller name
     *
     * @var string
     */
    var $controller_name = 'email_templates_admin';
    /**
     * Selected email template
     *
     * @var EmailTemplate
     */
    var $active_template;
    /**
     * Constructor
     *
     * @param Request $request
     * @return EmailTemplatesAdminController
     */
    function __construct($request)
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:EmailTemplatesAdminController.class.php

示例9: use_controller

<?php

// Extend timetracking controller
use_controller('timetracking', TIMETRACKING_MODULE);
/**
 * Handle project time report related actions
 *
 * @package activeCollab.modules.timetracking
 * @subpackage controllers
 */
class ProjectTimeReportsController extends TimetrackingController
{
    /**
     * Controller name
     *
     * @var string
     */
    var $controller_name = 'project_time_reports';
    /**
     * Selected report
     *
     * @var TimeReport
     */
    var $active_report;
    /**
     * Contruct time report controller
     *
     * @param Request $request
     * @return ProjectTimeReportsController
     */
    function __construct($request)
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:ProjectTimeReportsController.class.php

示例10: use_controller

<?php

use_controller('pages', PAGES_MODULE);
/**
 * Page versions controller
 *
 * @package activeCollab.modules.pages
 * @subpackage controllers
 */
class PageVersionsController extends PagesController
{
    /**
     * Active module
     *
     * @var string
     */
    var $active_module = PAGES_MODULE;
    /**
     * Selected page version
     *
     * @var PageVersion
     */
    var $active_page_version;
    /**
     * Construct page versions controller
     *
     * @param Request $request
     * @return PageVersionsController
     */
    function __construct($request)
    {
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:PageVersionsController.class.php

示例11: use_controller

<?php

// we need AppicationController
use_controller('application');
/**
 * PublicSubmit Public Controller
 *
 * @package activeCollab.modules.public_submit
 * @subpackage controllers
 */
class PublicSubmitController extends ApplicationController
{
    /**
     * Controller name
     *
     * @var string
     */
    var $controller_name = 'public_submit';
    /**
     * Active project (determined in admin settings)
     *
     * @var Project
     */
    var $active_project;
    /**
     * Is captcha enabled?
     *
     * @var boolean
     */
    var $captcha_enabled = false;
    /**
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:PublicSubmitController.class.php

示例12: use_controller

<?php

// Use people controller
use_controller('people', SYSTEM_MODULE);
/**
 * Company profile controller
 *
 * @package activeCollab.modules.system
 * @subpackage controllers
 */
class CompaniesController extends PeopleController
{
    /**
     * Controller name
     *
     * @var string
     */
    var $controller_name = 'companies';
    /**
     * Name of the parent module
     *
     * @var mixed
     */
    var $active_module = SYSTEM_MODULE;
    /**
     * Selected company
     *
     * @var Company
     */
    var $active_company;
    /**
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:CompaniesController.class.php

示例13: use_controller

<?php

// We need DocumentCategoriesController
use_controller('document_categories', DOCUMENTS_MODULE);
/**
 * Documents controller
 *
 * @package activeCollab.modules.documents
 * @subpackage controllers
 */
class DocumentsController extends DocumentCategoriesController
{
    /**
     * Active module
     *
     * @var string
     */
    var $active_module = DOCUMENTS_MODULE;
    /**
     * Controller name
     *
     * @var string
     */
    var $controller_name = 'documents';
    /**
     * Selected Document
     *
     * @var document
     */
    var $active_document;
    /**
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:DocumentsController.class.php

示例14: use_controller

<?php

// We need ProjectController
use_controller('project', SYSTEM_MODULE);
/**
 * Milestones controller
 *
 * @package activeCollab.modules.milestones
 * @subpackage models
 */
class MilestonesController extends ProjectController
{
    /**
     * Active module
     *
     * @var string
     */
    var $active_module = MILESTONES_MODULE;
    /**
     * Selected milestone
     *
     * @var Milestone
     */
    var $active_milestone;
    /**
     * Actions available through API
     *
     * @var array
     */
    var $api_actions = array('index', 'archive', 'view', 'add', 'edit');
    //BOF: task 03 | AD
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:MilestonesController.class.php

示例15: use_controller

<?php

// we need invoices controller
use_controller('invoices', INVOICING_MODULE);
/**
 * Invoices archive controller
 *
 * @package activeCollab.modules.invoicing
 * @subpackage controllers
 */
class InvoicesArchiveController extends InvoicesController
{
    /**
     * Name of this controller
     *
     * @var string
     */
    var $controller_name = 'invoices_archive';
    /**
     * Construct invoices archive controller
     *
     * @param Request $request
     * @return InvoicesArchiveController
     */
    function __construct($request)
    {
        parent::__construct($request);
        $this->wireframe->addBreadCrumb(lang('Archive'), assemble_url('invoices_archive'));
        js_assign('invoicing_precision', INVOICE_PRECISION);
    }
    // __construct
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:InvoicesArchiveController.class.php


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