Beispiel #1
0
 /**
  * Get a URL for the image resource
  *
  * @param string $imageIdentifier An image identifier
  * @return Http\ImageUrl
  */
 public function getImageUrl($imageIdentifier)
 {
     $url = sprintf($this->getHostForImageIdentifier($imageIdentifier) . '/users/%s/images/%s', $this->getUser(), $imageIdentifier);
     return Http\ImageUrl::factory($url, $this->getConfig('privateKey'), $this->getPublicKey());
 }
 public function testDoesNotIncludeTransformationQueryParamIfNoTransformationsAdded()
 {
     $url = 'http://imbo/users/bar/images/imgIdentifier?foo=bar&z=lulz';
     $imgUrl = ImageUrl::factory($url);
     $this->assertSame('http://imbo/users/bar/images/imgIdentifier?foo=bar&z=lulz', (string) $imgUrl);
 }