message() public static method

Get response message
public static message ( integer $code ) : string
$code integer
return string
Example #1
0
 /**
  * @param int $flags
  * @return array|string
  */
 public function build($flags = 0)
 {
     $lines = [];
     if ($flags & self::BUILD_STATUS && StatusCode::message($this->statusCode)) {
         $lines[] = 'HTTP/' . $this->version . ' ' . $this->statusCode . ' ' . StatusCode::message($this->statusCode);
     }
     foreach ($this->fields as $field => $value) {
         $lines[] = $field . ': ' . $value;
     }
     if ($flags & self::BUILD_FIELDS) {
         return implode("\r\n", $lines);
     }
     return $lines;
 }