function freezeUrl($url)
    {
        if (in_array($url, $this->frozen)) {
            return;
        }

        $client = new HttpKernel\Client($this->application);
        $client->request('GET', $url);

        $response = $client->getResponse();

        if (!$response->isOk()) {
            return;
        }

        $destination = $this->application['freezer.destination'] . $this->getFileName($url);

        if (!is_dir(dirname($destination))) {
            mkdir(dirname($destination), 0755, true);
        }

        file_put_contents($destination, $response->getContent());

        $this->frozen[] = $url;
    }
function freezeUrl($url)
    {
        if (in_array($url, $this->frozen)) {
            return;
        }

        $client = new HttpKernel\Client($this->application);
        $client->request('GET', $url);

        $response = $client->getResponse();

        if (!$response->isOk()) {
            return;
        }

        $destination = $this->application['freezer.destination'] . $this->getFileName($url);

        if (!is_dir(dirname($destination))) {
            mkdir(dirname($destination), 0755, true);
        }

        file_put_contents($destination, $response->getContent());

        $this->frozen[] = $url;
    }
function freezeUrl ( $ url ) { if ( in_array ( $ url , $ this -> frozen ) ) { return ; } $ client = new HttpKernel \ Client ( $ this -> application ) ; $ client -> request ( 'GET' , $ url ) ; $ response = $ client -> getResponse ( ) ; if ( ! $ response -> isOk ( ) ) { return ; } $ destination = $ this -> application [ 'freezer.destination' ] . $ this -> getFileName ( $ url ) ; if ( ! is_dir ( dirname ( $ destination ) ) ) { mkdir ( dirname ( $ destination ) , 0755 , true ) ; } file_put_contents ( $ destination , $ response -> getContent ( ) ) ; $ this -> frozen [ ] = $ url ; }
Freezes a given URL

@todo Fix links so the static page can be viewed without server
@todo Add setting to rewrite links to a given base path.

@param string $url
Freezes a given URL