Example #1
-1
 public function testExamplePlainHttps()
 {
     $builder = new UrlBuilder("demos.imgix.net", false, "", ShardStrategy::CRC, false);
     $builder->setUseHttps(true);
     $params = array("w" => 100, "h" => 100);
     $url = $builder->createURL("bridge.png", $params);
     $this->assertEquals("https://demos.imgix.net/bridge.png?h=100&w=100", $url);
 }
Example #2
-1
 function init()
 {
     $builder = new UrlBuilder($this->getConfig('source'));
     $builder->setUseHttps($this->getConfig('use_https', true));
     if ($secureURLToken = $this->getConfig('secure_url_token')) {
         $builder->setSignKey($secureURLToken);
     }
     $this->builder = $builder;
 }
Example #3
-1
 /**
  * Get the Imgix UrlBuilder with settings
  *
  * @return UrlBuilder
  */
 protected function getBuilder()
 {
     $builder = new UrlBuilder($this->domains);
     if ($this->useHttps) {
         $builder->setUseHttps(true);
     }
     if ($this->signKey) {
         $builder->setSignKey($this->signKey);
     }
     return $builder;
 }