public function redirect($url)
    {
        if (!$this->isValidUrl($url)) {
            $url = $this->generateUrl($url);
        }

        header('Location: '.$url);
    }
public function redirect($url)
    {
        if (!$this->isValidUrl($url)) {
            $url = $this->generateUrl($url);
        }

        header('Location: '.$url);
    }
public function redirect ( $ url ) { if ( ! $ this -> isValidUrl ( $ url ) ) { $ url = $ this -> generateUrl ( $ url ) ; } header ( 'Location: ' . $ url ) ; }
Redirect to given URL.

@param string $url - URL to generate from

@return void
Redirect to given URL .