Example #1
0
 /**
  * Constructor.
  *
  * @param string|array $baseUrls Base asset URLs
  * @param string       $version  The package version
  * @param string       $format   The format used to apply the version
  */
 public function __construct($baseUrls = array(), $version = null, $format = null)
 {
     parent::__construct($version, $format);
     if (!is_array($baseUrls)) {
         $baseUrls = (array) $baseUrls;
     }
     $this->baseUrls = array();
     foreach ($baseUrls as $baseUrl) {
         $this->baseUrls[] = rtrim($baseUrl, '/');
     }
 }
Example #2
0
 /**
  * Constructor.
  *
  * @param string $basePath The base path to be prepended to relative paths
  * @param string $version  The package version
  * @param string $format   The format used to apply the version
  */
 public function __construct($basePath = null, $version = null, $format = null)
 {
     parent::__construct($version, $format);
     if (!$basePath) {
         $this->basePath = '/';
     } else {
         if ('/' != $basePath[0]) {
             $basePath = '/' . $basePath;
         }
         $this->basePath = rtrim($basePath, '/') . '/';
     }
 }