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


PHP MVCUtils::includeViewer方法代码示例

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


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

示例1:

<?php

/**
 * 
 * @package MVC
 */
include_once $cfg['DBAL']['dir']['root'] . '/BasicGenericObjectCollection.class.php';
include_once $cfg['DBAL']['dir']['root'] . '/Database.class.php';
include_once $cfg['MVC']['dir']['root'] . '/IController.class.php';
include_once $cfg['MVC']['dir']['root'] . '/MVCUtils.class.php';
MVCUtils::includeViewer('Viewer', 'MVC');
//include_once($cfg['MVC']['dir']['root'] . '/validators/EmailValidator.class.php');
/**
 * Processes request data and constructs an aparopiate model or viewer
 * 
 * This class is used by simply initialising. Input data is taken 
 * from superglobals.
 * 
 * 
 * @package MVC
 */
class Page implements IController
{
    /**
     * The module of this class, used in debugging
     */
    const module = 'MVC';
    /**
     * The ID of the template to use. The ID is that of the row in the database
     * @var int
     */
开发者ID:radiowarwick,项目名称:digiplay_legacy,代码行数:31,代码来源:Page.class.php

示例2: setupTemplate

<?php

/**
 * @package FrontEnds
 * @subpackage CMS
 */
include_once $cfg['MVC']['dir']['root'] . '/MVCUtils.class.php';
MVCUtils::includeViewer('EditContentWindowViewer', 'CMS');
class EditContentViewer extends EditContentWindowViewer
{
    protected function setupTemplate()
    {
        global $cfg;
        parent::setupTemplate();
        $db = Database::getInstance($cfg['MVC']['dsn']);
        $sql = 'SELECT regionid FROM cmsregions ORDER BY name';
        $rIDs = $db->getColumn($sql);
        $sql = 'SELECT name FROM cmsregions ORDER BY name';
        $rNames = $db->getColumn($sql);
        $regions = array_combine($rIDs, $rNames);
        $this->assign('regions', $regions);
        if (isset($this->fieldData['regionID'])) {
            $sql = 'SELECT cmsregions.inlinetoolbar, 
			               cmsregions.windowtoolbar, 
			               cmsregions.editrealm, 
			               cmsregions.viewrealm,
			               cmsregions.name FROM cmsregions 
			       WHERE cmsregions.regionid = ?';
            $regionData = $db->getRow($sql, array($this->fieldData['regionID']));
            $this->assign('inlineToolbar', $regionData['inlinetoolbar']);
            $this->assign('windowToolbar', $regionData['windowtoolbar']);
开发者ID:radiowarwick,项目名称:digiplay_legacy,代码行数:31,代码来源:EditContentViewer.class.php

示例3: setupTemplate

<?php

/**
 * @package FrontEnds
 * @subpackage Auth
 */
include_once $cfg['MVC']['dir']['root'] . '/MVCUtils.class.php';
MVCUtils::includeViewer('Viewer', 'tkfecommon');
class LocationViewer extends Viewer
{
    protected function setupTemplate()
    {
        parent::setupTemplate();
        global $cfg;
        $db = Database::getInstance($cfg['DPS']['dsn']);
        $sql = "SELECT DISTINCT location as locid, location as locname \n\t\t\tFROM configuration \n\t\t\tWHERE location != -1 AND \n\t\t\t\tlocation != 0\n\t\t\tORDER BY location ASC";
        $locs = $db->getAll($sql);
        $this->assign('locs', $locs);
    }
}
开发者ID:radiowarwick,项目名称:digiplay_legacy,代码行数:20,代码来源:LocationViewer.class.php

示例4: setupTemplate

<?php

/**
 * @package DPS
 */
include_once $cfg['MVC']['dir']['root'] . '/MVCUtils.class.php';
MVCUtils::includeViewer('AuthViewer', 'Auth');
class DPSLogoutViewer extends AuthViewer
{
    protected function setupTemplate()
    {
        parent::setupTemplate();
        $auth = Auth::getInstance();
        $auth->logout();
    }
}
开发者ID:radiowarwick,项目名称:digiplay_legacy,代码行数:16,代码来源:DPSLogoutViewer.class.php

示例5: initializeViewer

 /**
  * Initialise a viewer object
  *
  * This method will intialise the viewer class associated with the specified  
  * model and template. The name of the class is loaded from the database,
  * the file is included, an instance is initialised, and finally assigned
  * to the $viewer class variable.
  *
  */
 public static function initializeViewer($templateIDS, $formName = null, $viewerModuleName, $fieldData = array(), $errors = array())
 {
     global $cfg;
     $db = Database::getInstance($cfg['MVC']['dsn']);
     $sql = "SELECT viewerclassname FROM templates WHERE templateid = ?";
     $classname = $db->getOne($sql, array(end($templateIDS)));
     MVCUtils::includeViewer($classname, $viewerModuleName);
     $pathParts = pathinfo($classname);
     $realClassName = $pathParts['basename'];
     eval("\$newViewer = new {$realClassName}(\$templateIDS, \$formName, \$viewerModuleName, \$fieldData, \$errors);");
     return $newViewer;
 }
开发者ID:radiowarwick,项目名称:digiplay_legacy,代码行数:21,代码来源:MVCUtils.class.php

示例6: Page

<?php

/**
 * @package FrontEnds
 * @subpackage Auth
 */
include_once 'config.php';
include_once $cfg['MVC']['dir']['root'] . '/Page.class.php';
include_once $cfg['Auth']['dir']['root'] . '/AuthUtil.class.php';
MVCUtils::includeViewer('ExceptionViewer', 'MVC');
$c = new Page();
开发者ID:radiowarwick,项目名称:digiplay_legacy,代码行数:11,代码来源:index.php

示例7:

<?php

include_once $cfg['MVC']['dir']['root'] . '/IController.class.php';
MVCUtils::includeViewer('RenderedExceptionViewer', 'MVC');
class Renderer implements IController
{
    /**
     * The module of this class, used in debugging
     */
    const module = 'MVC';
    /**
     * The ID of the template to use. The ID is that of the row in the database
     * @var int
     */
    protected $templateIDStack;
    /**
     * The name of the form (if any) which has been submitted
     * @var string
     */
    protected $formName;
    /**
     * An associative array for field/value pairs from the submitted form (if any)
     * @var array
     */
    protected $fieldData;
    protected $viewer;
    protected $viewerModuleName;
    protected $errors;
    /**
     * Initialise the Renderer object
     * 
开发者ID:radiowarwick,项目名称:digiplay_legacy,代码行数:31,代码来源:Renderer.class.php


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