code/service/JSendResponse.php
public function setStatus($status)
    {
        if (!in_array($status, $this->getStatusses())) {
            throw new Exception(sprintf('Illegal status %1$s given. Must be one of %2$s', $status, implode(', ', $this->getStatusses())));
        }

        $this->status = $status;

        return $this;
    }
public function setStatus($status)
    {
        if (!in_array($status, $this->getStatusses())) {
            throw new Exception(sprintf('Illegal status %1$s given. Must be one of %2$s', $status, implode(', ', $this->getStatusses())));
        }

        $this->status = $status;

        return $this;
    }
public function setStatus ( $ status ) { if ( ! in_array ( $ status , $ this -> getStatusses ( ) ) ) { throw new Exception ( sprintf ( 'Illegal status %1$s given. Must be one of %2$s' , $ status , implode ( ', ' , $ this -> getStatusses ( ) ) ) ) ; } $ this -> status = $ status ; return $ this ; }
Set the status for this response

@param string $status

@throws \Exception
@return $this
Set the status for this response