Beispiel #1
0
 /**
  * @param ModelContract $model
  * @param string        $style
  *
  * @return string
  */
 protected function doParsePath(ModelContract $model, $style)
 {
     $string = preg_replace("/:style\\b/", $style, $this->path);
     foreach ($this->getInterpolations() as $key => $value) {
         if (strpos($string, $key) !== false) {
             $string = preg_replace("/{$key}\\b/", $model->getAttribute($value), $string);
         }
     }
     return $string;
 }