public function display()
    {
        $this->output = $this->content;

        //if content is an exception then
        //handle
        if ($this->content instanceof Exception) {
            $data = array();
            $data['code'] = $this->content->getCode();
            $data['message'] = (string) $this->content->getMessage();
            if ($this->content instanceof AnErrorException) {
                $data['errors'] = $this->_toData($this->content->getErrors());
            }
           //Encode data
            $this->output = json_encode($data);
        }

        return $this->output;
    }
public function display()
    {
        $this->output = $this->content;

        //if content is an exception then
        //handle
        if ($this->content instanceof Exception) {
            $data = array();
            $data['code'] = $this->content->getCode();
            $data['message'] = (string) $this->content->getMessage();
            if ($this->content instanceof AnErrorException) {
                $data['errors'] = $this->_toData($this->content->getErrors());
            }
           //Encode data
            $this->output = json_encode($data);
        }

        return $this->output;
    }
public function display ( ) { $ this -> output = $ this -> content ; //if content is an exception then //handle if ( $ this -> content instanceof Exception ) { $ data = array ( ) ; $ data [ 'code' ] = $ this -> content -> getCode ( ) ; $ data [ 'message' ] = ( string ) $ this -> content -> getMessage ( ) ; if ( $ this -> content instanceof AnErrorException ) { $ data [ 'errors' ] = $ this -> _toData ( $ this -> content -> getErrors ( ) ) ; } //Encode data $ this -> output = json_encode ( $ data ) ; } return $ this -> output ; }
Just return the content.

@return string
Just return the content .