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


PHP PHPTAL::setIncludePath方法代码示例

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


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

示例1: setSource

 /**
  * Set template from source.
  *
  * Should be used only with temporary template sources.
  * Use setTemplate() or addSourceResolver() whenever possible.
  *
  * @param string $src The phptal template source.
  * @param string $path Fake and 'unique' template path.
  * @return $this
  */
 public function setSource($src, $path = false)
 {
     PHPTAL::setIncludePath();
     require_once 'PHPTAL/StringSource.php';
     PHPTAL::restoreIncludePath();
     if (!$path) {
         $path = PHPTAL_StringSource::NO_PATH_PREFIX . md5($src) . '>';
     }
     $this->_prepared = false;
     $this->_functionName = null;
     $this->_codeFile = null;
     $this->_source = new PHPTAL_StringSource($src, $path);
     $this->_path = $path;
     return $this;
 }
开发者ID:rafalenden,项目名称:KioCMS,代码行数:25,代码来源:PHPTAL.class.php

示例2: initializeGroups

 /**
  * Ensures that $this->groups works.
  *
  * Groups are rarely-used feature, which is why they're lazily loaded.
  */
 private function initializeGroups()
 {
     if (!$this->uses_groups) {
         if (!class_exists('PHPTAL_RepeatControllerGroups')) {
             PHPTAL::setIncludePath();
             require_once "PHPTAL/RepeatControllerGroups.php";
             PHPTAL::restoreIncludePath();
         }
         $this->groups = new PHPTAL_RepeatControllerGroups();
         $this->uses_groups = true;
     }
 }
开发者ID:rafalenden,项目名称:KioCMS,代码行数:17,代码来源:RepeatController.php

示例3: __construct

<?php

/**
 * PHPTAL templating engine
 *
 * PHP Version 5
 *
 * @category HTML
 * @package  PHPTAL
 * @author   Laurent Bedubourg <lbedubourg@motion-twin.com>
 * @author   Kornel Lesiński <kornel@aardvarkmedia.co.uk>
 * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
 * @version  SVN: $Id: FileSourceResolver.php 731 2009-09-25 16:31:56Z kornel $
 * @link     http://phptal.org/
 */
PHPTAL::setIncludePath();
require_once 'PHPTAL/SourceResolver.php';
PHPTAL::restoreIncludePath();
/**
 * Finds template on disk by looking through repositories first
 *
 * @package PHPTAL
 */
class PHPTAL_FileSourceResolver implements PHPTAL_SourceResolver
{
    public function __construct($repositories)
    {
        $this->_repositories = $repositories;
    }
    public function resolve($path)
    {
开发者ID:palmic,项目名称:lbox,代码行数:31,代码来源:FileSourceResolver.php


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