public function setCallback(callable $callback, array $params = [])
    {
        if ($this->hasCallback()) {
            throw new ArchException('Callback already defined');
        }
        $this->callback = $callback;
        $this->callbackParams = $params;
        return $this;
    }
public function setCallback(callable $callback, array $params = [])
    {
        if ($this->hasCallback()) {
            throw new ArchException('Callback already defined');
        }
        $this->callback = $callback;
        $this->callbackParams = $params;
        return $this;
    }
public function setCallback ( callable $ callback , array $ params = [ ] ) { if ( $ this -> hasCallback ( ) ) { throw new ArchException ( 'Callback already defined' ) ; } $ this -> callback = $ callback ; $ this -> callbackParams = $ params ; return $ this ; }
Define the callback function.
This function need to send a content feed on standard output.
This callback is usefull to bypass the body in order to optimize performances.
@param string $callback
@return $this
Define the callback function . This function need to send a content feed on standard output . This callback is usefull to bypass the body in order to optimize performances .