private function createImagePath($name, $resolution, $method) { if ($image = $this->local->createImagePath($name, $resolution, $method)) { return $image; } elseif ($this->remote && ($image = $this->remote->createImagePath($resolution, $name, $method))) { return $image; } return $this->placehold->createImagePath($resolution); }
/** * @param string $resolution * @param string $name * @param int $method * @return ImagePath */ public function createImagePath($resolution, $name, $method) { $url = $this->hostUrl . '/' . $this->path->getRawUrl($name, $resolution, $method); return $this->local->saveFile($url, $name, $resolution, $method); }