public function capturePage($id = null, $ttl = null, $exit = true)
    {
        if ($id === null) {
            $id = md5(serialize($_SERVER['REQUEST_URI']) . serialize($_REQUEST));
        }

        if ($this->start($id)) {
            if ($exit) {
                exit;
            }
            return true;
        }
        $self = $this;
        register_shutdown_function(function() use ($self, $ttl) { $self->end($ttl); });
        return false;
    }
public function capturePage($id = null, $ttl = null, $exit = true)
    {
        if ($id === null) {
            $id = md5(serialize($_SERVER['REQUEST_URI']) . serialize($_REQUEST));
        }

        if ($this->start($id)) {
            if ($exit) {
                exit;
            }
            return true;
        }
        $self = $this;
        register_shutdown_function(function() use ($self, $ttl) { $self->end($ttl); });
        return false;
    }
public function capturePage ( $ id = null , $ ttl = null , $ exit = true ) { if ( $ id === null ) { $ id = md5 ( serialize ( $ _SERVER [ 'REQUEST_URI' ] ) . serialize ( $ _REQUEST ) ) ; } if ( $ this -> start ( $ id ) ) { if ( $ exit ) { exit ; } return true ; } $ self = $ this ; register_shutdown_function ( function ( ) use ( $ self , $ ttl ) { $ self -> end ( $ ttl ) ; } ) ; return false ; }
Captures the whole output of the script until it ends.

If no $id is specified, it will be computed from a combination
of the $_SERVER['REQUEST_URI'] and the $_REQUEST variables.

If $id is found, the script will exit unless $exit is set to false.

@param string $id
@param int $ttl
@param bool $exit
@return bool
Captures the whole output of the script until it ends .