MvcLite\Response

Base Response

Synopsis

class Response extends ObjectAbstract {
  • // constants
  • const DEFAULT_CONTENT_TYPE = 'application/json';
  • const ERR_INVALID_CONTENT_TYPE = 'The given content-type [%s] is not valid';
  • // members
  • protected array $headers = ;
  • protected string $body = '';
  • // Inherited methods from ObjectAbstract
  • public final void __get()
  • public final void __set()
  • public final void __call()
  • public void __toString()
  • public string identify()
  • // Inherited methods from Singleton
  • public static Singleton getInstance()
}

Hierarchy

Coverage

Methods 100% 10 / 10
Lines 100% 34 / 34

Constants

Name Value
DEFAULT_CONTENT_TYPE 'application/json'
ERR_INVALID_CONTENT_TYPE 'The given content-type [%s] is not valid'
MSG_ERR_IDENTIFY 'Descendents must implement the identify method'

Members

protected

  • $body — string
    The body of the response
  • $headers — array
    A list of headers to be output
  • $instanceMvcLite\Traits\Singleton
    Static instance variable

Methods

public

Inherited from MvcLite\ObjectAbstract

public

  • __call() — Overriding the __call magic method
  • __get() — Overriding the __get magic method
  • __set() — Overriding the __set magic method
  • __toString() — returns a string representation of the object
  • identify() — method used to identify the object instance

Inherited from MvcLite\Traits\Singleton

public

History