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


PHP AssetInterface::load方法代码示例

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


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

示例1: load

 /**
  * {@inheritdoc}
  */
 public function load(FilterInterface $additionalFilter = null)
 {
     if (!$this->innerAsset) {
         $this->createInnerAsset();
     }
     return $this->innerAsset->load($additionalFilter);
 }
开发者ID:puli,项目名称:assetic-extension,代码行数:10,代码来源:LazyAsset.php

示例2: dump

 public function dump(AssetInterface $asset)
 {
     $writer = new \Assetic\AssetWriter(sys_get_temp_dir(), $this->container->getParameter('assetic.variables'));
     $ref = new \ReflectionMethod($writer, 'getCombinations');
     $ref->setAccessible(true);
     $name = $asset->getSourcePath();
     $type = substr($name, strrpos($name, '.') + 1);
     switch ($type) {
         case 'coffee':
             $asset->ensureFilter($this->container->get('assetic.filter.coffee'));
             $type = 'js';
             break;
         case 'less':
             $asset->ensureFilter($this->container->get('assetic.filter.less'));
             $type = 'css';
             break;
     }
     $combinations = $ref->invoke($writer, $asset->getVars());
     $asset->setValues($combinations[0]);
     $asset->load();
     $content = $asset->getContent();
     // because the assetic cssrewrite makes bullshit here, we need to reimplement the filter
     if ($type === 'css') {
         $content = $this->cssFilter($content, '/' . dirname($asset->getSourcePath()));
     }
     return $content;
 }
开发者ID:roomthirteen,项目名称:Room13AsseticServerBundle,代码行数:27,代码来源:DumpAssetCommand.php

示例3: load

 /**
  * Loads the asset into memory and applies load filters.
  *
  * @param FilterInterface|null $additionalFilter
  */
 public function load(FilterInterface $additionalFilter = null)
 {
     $cacheKey = $this->getCacheKey($this->asset, $additionalFilter, 'load');
     if ($this->cache->has($cacheKey)) {
         $this->asset->setContent($this->cache->get($cacheKey));
         return;
     }
     $this->asset->load($additionalFilter);
     $this->cache->set($cacheKey, $this->asset->getContent());
 }
开发者ID:sunnyct,项目名称:silexcmf-assetic,代码行数:15,代码来源:AssetCache.php

示例4: load

 /**
  * {@inheritdoc}
  */
 public function load(FilterInterface $additionalFilter = null)
 {
     return $this->asset->load($additionalFilter);
 }
开发者ID:bit3,项目名称:contao-theme-plus,代码行数:7,代码来源:AbstractDelegatorAsset.php


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