src/WebServices/FrontController.php
public function display($return = false)
    {
        if ($this->getStatus()===null) {
            $this->setStatus(self::STATUS_OK);
        }
        if ($this->getMessage()===null) {
            $this->setMessage(
                array_key_exists($this->getStatus(), self::$default_messages) ?
                    self::$default_messages[$this->getStatus()] : ''
            );
        }
        if ($this->getResponse()->getStatus()===null) {
            $this->getResponse()->setStatus(HttpStatus::OK);
        }
        $this->getResponse()->setHeaders($this->headers);
        if ($return) {
            return $this->getResponse();
        } else {
            $this->getResponse()->send();
        }
    }
public function display($return = false)
    {
        if ($this->getStatus()===null) {
            $this->setStatus(self::STATUS_OK);
        }
        if ($this->getMessage()===null) {
            $this->setMessage(
                array_key_exists($this->getStatus(), self::$default_messages) ?
                    self::$default_messages[$this->getStatus()] : ''
            );
        }
        if ($this->getResponse()->getStatus()===null) {
            $this->getResponse()->setStatus(HttpStatus::OK);
        }
        $this->getResponse()->setHeaders($this->headers);
        if ($return) {
            return $this->getResponse();
        } else {
            $this->getResponse()->send();
        }
    }
public function display ( $ return = false ) { if ( $ this -> getStatus ( ) === null ) { $ this -> setStatus ( self :: STATUS_OK ) ; } if ( $ this -> getMessage ( ) === null ) { $ this -> setMessage ( array_key_exists ( $ this -> getStatus ( ) , self :: $ default_messages ) ? self :: $ default_messages [ $ this -> getStatus ( ) ] : '' ) ; } if ( $ this -> getResponse ( ) -> getStatus ( ) === null ) { $ this -> getResponse ( ) -> setStatus ( HttpStatus :: OK ) ; } $ this -> getResponse ( ) -> setHeaders ( $ this -> headers ) ; if ( $ return ) { return $ this -> getResponse ( ) ; } else { $ this -> getResponse ( ) -> send ( ) ; } }
Displays the request result
Displays the request result