Response
API reference › yii › base › Response
2 subclasses
Response represents the response of an Application to a Request.
For more details and usage information on Response, see the guide article on responses.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$behaviors read-only | array<Behavior<static>> | List of behaviors attached to this component. | Component |
$exitStatus | int | The exit status. Default: 0. | Response |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Constructor. | BaseObject |
__call() | Calls the named method which is not a class method. | Component |
__clone() | This method is called after the object is created by cloning an existing one. | Component |
__get() | Returns the value of a component property. | Component |
__isset() | Checks if a property is set, i.e. defined and not null. | Component |
__set() | Sets the value of a component property. | Component |
__unset() | Sets a component property to be null. | Component |
attachBehavior() | Attaches a behavior to this component. | Component |
attachBehaviors() | Attaches a list of behaviors to the component. | Component |
behaviors() | Returns a list of behaviors that this component should behave as. | Component |
canGetProperty() | Returns a value indicating whether a property can be read. | Component |
canSetProperty() | Returns a value indicating whether a property can be set. | Component |
className() static | Returns the fully qualified name of this class. | BaseObject |
clearOutputBuffers() | Removes all existing output buffers. | Response |
detachBehavior() | Detaches a behavior from the component. | Component |
detachBehaviors() | Detaches all behaviors from the component. | Component |
ensureBehaviors() | Makes sure that the behaviors declared in behaviors() are attached to this component. | Component |
getBehavior() | Returns the named behavior object. | Component |
getBehaviors() | Returns all behaviors attached to this component. | Component |
hasEventHandlers() | Returns a value indicating whether there is any handler attached to the named event. | Component |
hasMethod() | Returns a value indicating whether a method is defined. | Component |
hasProperty() | Returns a value indicating whether a property is defined for this component. | Component |
init() | Initializes the object. | BaseObject |
off() | Detaches an existing event handler from this component. | Component |
on() | Attaches an event handler to an event. | Component |
send() | Sends the response to client. | Response |
trigger() | Triggers an event. | Component |
Property details
Section titled “Property details”$exitStatus
Section titled “$exitStatus ”public int $exitStatus = 0The exit status.
Exit statuses should be in the range 0 to 254. The status 0 means the program terminates successfully.
Method details
Section titled “Method details”clearOutputBuffers()
Section titled “clearOutputBuffers() ”public function clearOutputBuffers(): mixedRemoves all existing output buffers.
Returns
mixed
send()
Section titled “send() ”public function send(): mixedSends the response to client.
Returns
mixed