當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。