Browse Source

Added doc.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
bab3222907
  1. 7
      framework/web/AssetBundle.php
  2. 4
      framework/web/AssetManager.php

7
framework/web/AssetBundle.php

@ -85,6 +85,11 @@ class AssetBundle extends Object
* @var array list of the bundle names that this bundle depends on
*/
public $depends = array();
/**
* @var array the options to be passed to [[AssetManager::publish()]] when the asset bundle
* is being published.
*/
public $publishOption = array();
/**
* Initializes the bundle.
@ -114,7 +119,7 @@ class AssetBundle extends Object
}
if ($this->sourcePath !== null) {
list ($this->basePath, $this->baseUrl) = $am->publish($this->sourcePath);
list ($this->basePath, $this->baseUrl) = $am->publish($this->sourcePath, $this->publishOption);
}
foreach ($this->js as $js => $options) {

4
framework/web/AssetManager.php

@ -164,6 +164,10 @@ class AssetManager extends Component
* Note, in case $forceCopy is false the method only checks the existence of the target
* directory to avoid repetitive copying (which is very expensive).
*
* By default, when publishing a directory, subdirectories and files whose name starts with a dot "."
* will NOT be published. If you want to change this behavior, you may specify the "beforeCopy" option
* as explained in the `$options` parameter.
*
* Note: On rare scenario, a race condition can develop that will lead to a
* one-time-manifestation of a non-critical problem in the creation of the directory
* that holds the published assets. This problem can be avoided altogether by 'requesting'

Loading…
Cancel
Save