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


PHP Theme::getPath方法代码示例

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


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

示例1: exampleImageUrls

 public function exampleImageUrls()
 {
     $layout = new ThemeLayout(1);
     $template = new ThemeTemplate(1);
     $theme = new Theme(1);
     print_d($layout->getThemeConfig());
     var_dump($theme->getPath());
     var_dump($template->getImageUrl());
     echo '<br>';
     var_dump($layout->getImageUrl());
     echo '<br>';
     var_dump($theme->getImageUrl());
 }
开发者ID:andrewkrug,项目名称:repucaution,代码行数:13,代码来源:test.php

示例2: path

 /**
  * Gets the full URL of a file in a theme dir based on its relative name
  *
  * @param string $relative relative path within the theme directory
  * @param string $name     name of the theme; defaults to current theme
  *
  * @return string URL of the file
  */
 static function path($relative, $name = null)
 {
     $theme = new Theme($name);
     return $theme->getPath($relative);
 }
开发者ID:himmelex,项目名称:NTW,代码行数:13,代码来源:theme.php

示例3: implode

        // clean segments
        $segments = URL::sanitize($segments);

        /*
        |--------------------------------------------------------------------------
        | Hook: Routes Before
        |--------------------------------------------------------------------------
        |
        | Useful for running your own route. Remember to use $app->pass() if
        | you're not doing anything with the current request.
        |
        */
        Hook::run('_routes', 'before');

        $file_requested = implode($segments, '/');
        $file = Theme::getPath() . $file_requested;

        $file = realpath($file);

        # Routes only if the file doesn't already exist (e.g. /assets/whatever.ext)
        if ( ! File::exists(array($file_requested, $file))) {

            Log::warn("The Static Asset Pipeline is deprecated. It may yet come back to fight another battle someday.", "core", "asset pipeline");

            $mime = File::resolveMime($file);

            header("Content-type: {$mime}");
            readfile($file);

            exit();
开发者ID:jalmelb,项目名称:24hl2015,代码行数:30,代码来源:routes.php

示例4: defined

<?php

defined('PMDDA') or die('Restricted access');
?>
<script src="<?php 
echo Theme::getPath();
?>
bootstrap/js/bootstrap.js"></script>
<script src="<?php 
echo Theme::getPath();
?>
js/PHPMongoDB.js?v=<?php 
echo Theme::getVersion('/application/themes/default/js/PHPMongoDB.js');
?>
"></script>
<script type="text/javascript">
    $("[rel=tooltip]").tooltip();
    $(function() {
        $('.demo-cancel-click').click(function() {
            return false;
        });
    });
</script>

<div class="footer row-fluid">
            <div class="navbar-inner">
                <ul class="nav pull-right">
                   
                    <li > <a href="http://www.phpmongodb.org" target="_blank">&copy; <?php 
echo date('Y');
?>
开发者ID:andrewyang96,项目名称:phpmongodb,代码行数:31,代码来源:footer.php

示例5: getSourcePath

 /**
  * Get the original source path
  * @return string
  */
 public function getSourcePath()
 {
     return $this->theme->getPath() . '/assets';
 }
开发者ID:Houbsi,项目名称:Core,代码行数:8,代码来源:AssetPublisher.php

示例6: display

 /**
  * Output the template into the browser
  * Will also assign the labels and all user-defined constants.
  * If you want custom-headers, you should set them yourself, otherwise the content-type and charset will be set
  *
  * @param string $template      The path of the template to use.
  * @param bool   $customHeaders Deprecated variable.
  * @param bool   $parseCustom   Parse custom template.
  */
 public function display($template, $customHeaders = false, $parseCustom = false)
 {
     // do custom stuff
     if ($parseCustom) {
         new TemplateCustom($this);
     }
     // parse constants
     $this->parseConstants();
     // check debug
     $this->parseDebug();
     // parse the label
     $this->parseLabels();
     // parse date/time formats
     $this->parseDateTimeFormats();
     // parse vars
     $this->parseVars();
     // get template path
     $template = Theme::getPath($template);
     /*
      * Code below is exactly the same as from our parent (SpoonTemplate::display), except
      * for the compiler being used. We want our own compiler extension here.
      */
     // redefine
     $template = (string) $template;
     // validate name
     if (trim($template) == '' || !is_file($template)) {
         throw new \SpoonTemplateException('Please provide an existing template.');
     }
     // compiled name
     $compileName = $this->getCompileName((string) $template);
     // compiled if needed
     if ($this->forceCompile || !is_file($this->compileDirectory . '/' . $compileName)) {
         // create compiler
         $compiler = new TemplateCompiler((string) $template, $this->variables);
         // set some options
         $compiler->setCacheDirectory($this->cacheDirectory);
         $compiler->setCompileDirectory($this->compileDirectory);
         $compiler->setForceCompile($this->forceCompile);
         $compiler->setForms($this->forms);
         // compile & save
         $compiler->parseToFile();
     }
     // load template
     require $this->compileDirectory . '/' . $compileName;
 }
开发者ID:newaltcoin,项目名称:forkcms,代码行数:54,代码来源:Template.php


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