Example #1
0
 /**
  * Generate an url
  *
  * @param  string $email
  * @param  string $format
  * @param  string $callback
  *
  * @return string
  */
 public function url($email, $format = null, $callback = null)
 {
     $hash = $this->hash($email);
     $params = $this->buildParams($format, $callback);
     $url = $this->urlGenerator->make(array($hash, $params));
     return $url;
 }
Example #2
0
 /**
  * Generate url for an email
  *
  * @param  string $email
  * @param  bool   $secure
  * @retrn  string
  */
 public function url($email, $secure = null)
 {
     $hash = $this->hash($email);
     $params = $this->compileParams();
     $url = $this->urlGenerator->make(array($hash, $params), $secure);
     return $url;
 }
Example #3
0
 /**
  * Constructor
  *
  * @return void
  */
 public function __construct(UrlGenerator $urlGenerator = null)
 {
     $this->container = new Fluent();
     $this->urlGenerator = $urlGenerator ?: new UrlGenerator();
     $this->urlGenerator->setTemplate($this->urlTemplate);
 }