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


PHP FD::resolve方法代码示例

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


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

示例1: attach

 public function attach($path = null)
 {
     // Keep current value
     $_styleTag = $this->styleTag;
     $_CDATA = $this->CDATA;
     // Keep original file value
     if (!is_null($path)) {
         $_file = $this->file;
         $this->file = FD::resolve($path . '.' . $this->extension);
     }
     // Reset to false
     $this->styleTag = false;
     $this->CDATA = false;
     $output = $this->parse();
     FD::page()->addInlineStylesheet($output);
     // Restore current value
     $this->styleTag = $_styleTag;
     $this->CDATA = $_CDATA;
     // Restore original file value
     if (!is_null($path)) {
         $this->file = $_file;
     }
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:23,代码来源:style.php

示例2: getResourcesSettings

 public function getResourcesSettings()
 {
     $config = FD::config();
     $assets = FD::get('Assets');
     $themes = FD::get('Themes');
     $locations = $assets->locations();
     // Build a deterministic cache
     $settings = array("language" => JFactory::getLanguage()->getTag(), "template" => array("site" => $config->get('theme.site', 'wireframe'), "admin" => $config->get('theme.admin', 'default')), "view" => array(), "modified" => filemtime($this->resourceManifestFile));
     // Determine if there are template overrides
     if (JFolder::exists($locations['site_override'])) {
         $settings["template"]["site_override"] = FD::call('Assets', 'getJoomlaTemplate', array('site'));
     }
     if (JFolder::exists($locations['admin_override'])) {
         $settings["template"]["admin_override"] = FD::call('Assets', 'getJoomlaTemplate', array('admin'));
     }
     // Get manifest
     $manifest = $this->getResourcesManifest();
     if (isset($manifest[0]->view) && $manifest[0]->view) {
         foreach ($manifest[0]->view as $view) {
             $original = $view;
             $view = 'themes:/' . $view;
             $path = FD::resolve($view . '.ejs');
             // If the file still does not exist, we'll skip this
             if (!JFile::exists($path)) {
                 continue;
             }
             $settings["view"][] = array("path" => str_ireplace(JPATH_ROOT, '', $path), "modified" => filemtime($path));
         }
     }
     // Build hash
     $settings["id"] = md5(serialize($settings));
     return $settings;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:33,代码来源:compiler.php

示例3: listen

 /**
  * Processes an ajax call that is passed to the server. It is smart enough to decide which
  * file would be responsible to keep these codes.
  *
  * @since	1.0
  * @access	public
  *
  * @author	Mark Lee <mark@stackideas.com>
  */
 public function listen()
 {
     $doc = JFactory::getDocument();
     $ajax = FD::getInstance('Ajax');
     // Do not proceed if the request is not in ajax format.
     if ($doc->getType() != 'ajax') {
         return;
     }
     // Namespace format should be POSIX format.
     $namespace = JRequest::getVar('namespace');
     $parts = explode(':/', $namespace);
     // Detect if the user passed in a protocol.
     $hasProtocol = count($parts) > 1;
     if (!$hasProtocol) {
         $namespace = 'ajax:/' . $namespace;
     }
     return FD::resolve($namespace);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:27,代码来源:ajax.php

示例4: output

 /**
  * Outputs the data from a template file.
  *
  * @since	1.0
  * @access	public
  * @param	string		Path to template.
  * @param	Array		An array of arguments.
  *
  * @return	string		The output of the theme file.
  *
  * @author	Mark Lee <mark@stackideas.com>
  */
 public function output($path = null, $vars = null)
 {
     // Keep original file value
     if (!is_null($path)) {
         $_file = $this->file;
         $this->file = FD::resolve($path . '.' . $this->extension);
     }
     // Let's try to extract the data.
     $output = $this->parse($vars);
     // Restore original file value
     if (!is_null($path)) {
         $this->file = $_file;
     }
     // Free up some memory
     unset($_file);
     return $output;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:29,代码来源:template.php


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