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


PHP AssetCollection::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructor.
  *
  * @param string|array $globs   A single glob path or array of paths
  * @param array        $filters An array of filters
  * @param string       $root    The root directory
  * @param array        $vars
  * @param bool         $recursive Should the glob search recursively
  */
 public function __construct($globs, $filters = array(), $root = null, array $vars = array(), $recursive = false)
 {
     $this->globs = (array) $globs;
     $this->initialized = false;
     $this->recursive = $recursive;
     parent::__construct(array(), $filters, $root, $vars);
 }
开发者ID:julesferreira,项目名称:assetic,代码行数:16,代码来源:GlobAsset.php

示例2: __construct

    /**
     * Constructor.
     *
     * @param string|array $globs   A single glob path or array of paths
     * @param array        $filters An array of filters
     * @param string       $baseDir A base directory to use for determining each source URL
     *
     * @throws InvalidArgumentException If the base directory doesn't exist
     */
    public function __construct($globs, $filters = array(), $baseDir = null)
    {
        $this->globs = (array) $globs;

        if (null !== $baseDir && $this->baseDir = realpath($baseDir)) {
            $this->baseDir .= DIRECTORY_SEPARATOR;
        }

        $this->initialized = false;

        parent::__construct(array(), $filters);
    }
开发者ID:nresni,项目名称:symfony-sandbox,代码行数:21,代码来源:GlobAsset.php

示例3: __construct

 /**
  * @param array $assets Array item is string or AssetInterface (AssetCollection also implements AssetInterface)
  * @param FilterInterface[] $filters Filters that will be applied to this collection. (item can by also FilterCollection, it implements FilterInterface)
  * @param NULL|string $sourceRoot Base directory for assets
  * @param NULL|string $name Collection name
  * @throws Exceptions\DirectoryNotFoundException
  */
 public function __construct($assets = array(), $filters = array(), $sourceRoot = NULL, $name = NULL)
 {
     $this->setName($name);
     // Validate source root if is set
     if ($sourceRoot !== NULL) {
         if (!file_exists($sourceRoot)) {
             throw new DirectoryNotFoundException("SourceRoot directory \"{$sourceRoot}\" not found.");
         } else {
             if (!is_dir($sourceRoot)) {
                 throw new DirectoryNotFoundException("SourceRoot path \"{$sourceRoot}\" is not directory.");
             } else {
                 $sourceRoot = realpath($sourceRoot);
             }
         }
     }
     parent::__construct(array(), $filters, $sourceRoot);
     $this->addAssets($assets);
 }
开发者ID:mike227,项目名称:n-assetic,代码行数:25,代码来源:AssetCollection.php

示例4: __construct

 /**
  * Creates the asset.
  *
  * You can pass asset variables that occur in the glob. You can later set
  * the variables by calling {@link setValues()}.
  *
  * @param ResourceRepository $repo The resource repository.
  * @param string             $glob The glob.
  * @param array              $vars The asset variables.
  */
 public function __construct(ResourceRepository $repo, $glob, array $vars = array())
 {
     parent::__construct(array(), array(), null, $vars);
     $this->repo = $repo;
     $this->glob = $glob;
 }
开发者ID:puli,项目名称:assetic-extension,代码行数:16,代码来源:PuliGlobAsset.php


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