phramework doc
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • Phramework
    • Authentication
    • Database
      • Operations
    • Exceptions
    • Extensions
    • Models
    • URIStrategy
    • Validate
    • Viewers

Classes

  • Cache
  • Compress
  • Email
  • Execute
  • Filter
  • Language
  • Operator
  • Request
  • Response
  • Upload
  • Util

Class Response

Response class

Provides function related to server response

Namespace: Phramework\Models
License: Apache-2.0
Author: Xenofon Spafaridis nohponex@gmail.com
Since: 0.4
Located at Models/Response.php

Methods summary

public static
# noContent( )

Responde with 204 No Content Status-Code

Responde with 204 No Content Status-Code

The server has fulfilled the request but does not need to return an entity-body, and might want to return updated metainformation. The response MAY include new or updated metainformation in the form of entity-headers, which if present SHOULD be associated with the requested variant. If the client is a user agent, it SHOULD NOT change its document view from that which caused the request to be sent. This response is primarily intended to allow input for actions to take place without causing a change to the user agent's active document view, although any new or updated metainformation SHOULD be applied to the document currently in the user agent's active view.

public static
# created( string $location )

Responde with 201 Created Status-Code

Responde with 201 Created Status-Code

The request has been fulfilled and resulted in a new resource being created. The newly created resource can be referenced by the URI(s) returned in the entity of the response, with the most specific URI for the resource given by a Location header field.

Parameters

$location
URI to newly created resouce
public static
# accepted( string $location,… )

Responde with 202 Accepted

Responde with 202 Accepted

The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status code from an asynchronous operation such as this.

Parameters

$location,…
URI to newly created resouce
public static
# cacheHeaders( $expires = '+1 hour' )

Write cache headers

Write cache headers

public static array
# headers( )

Returns a list of response headers sent (or ready to send)

Returns a list of response headers sent (or ready to send)

Returns

array
phramework doc API documentation generated by ApiGen