make $forceCopy a public property in AssetManager

Hi!

When you use CClientScript, it’s not possible to specify $forceCopy parameter in AssetManager::publish() method.

As a solution, I propose to make $forceCopy a public property in AssetManager.

For those who need the solution right now:


class AssetManager extends CAssetManager

{

  /**

   * @var boolean whether we should copy the asset file or directory even if it is already published before.

   * If true, it overrides a respective parameter in publish() method. 

   * If false, a respective parameter takes precedence.

   */

  public $forceCopy = false;

  

  /**

   * Sets up $forceCopy and calls parent implementation.

   * For parameters see CAssetManager::publish() method.

   * @return string an absolute URL to the published asset   

   */

  public function publish($path,$hashByName=false,$level=-1,$forceCopy=false)

  {

    $forceCopy = $this->forceCopy ? true : $forceCopy;

    return parent::publish($path, $hashByName, $level, $forceCopy);

  }

}

I think it would be better to do this change in CClientScript if it’s really required. What lead to to need this feature?