Example #1
0
 /**
  * Sınıf başlatır
  *
  * @param string $prefix
  * @param AssetInterface|null $manager
  */
 public function __construct($prefix = '', AssetInterface $manager = null)
 {
     $this->setManager($manager);
     $this->setPrefix($prefix);
     $this->pattern = $this->manager->getPattern();
     $this->version = $this->manager->getVersion();
 }
Example #2
0
 /**
  * Url'i oluşturur
  *
  * @param string $file
  * @return mixed
  */
 public function getUrl($file = '')
 {
     $version = $this->manager->getVersion();
     $pattern = $this->manager->getPattern();
     /** Search Params
      *  %f => $file
      *  %v => $version
      */
     $f = str_replace('%f', $file, $pattern);
     $v = str_replace('%v', $version, $f);
     return $this->getUrlString() . $v;
 }