/** * 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; }
/** * 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; }
/** * Constructor * * @return void */ public function __construct(UrlGenerator $urlGenerator = null) { $this->container = new Fluent(); $this->urlGenerator = $urlGenerator ?: new UrlGenerator(); $this->urlGenerator->setTemplate($this->urlTemplate); }