-
Notifications
You must be signed in to change notification settings - Fork 3
Request::requestForSAPI
Mo McRoberts edited this page Aug 7, 2011
·
1 revision
Return an instance of a Request class for a specified SAPI.
uses('request');
public static function Request [[Request]]::requestForSAPI(string [in,optional] $sapi = null)
Requests are encapsulated as one of several descendants of the [[Request]]
class, depending upon the SAPI in use.
If no SAPI name is specified when calling Request::requestForSAPI(), the current
SAPI name as identified by PHP (using php_sapi_name) will be used.
Additionally, if REQUEST_CLASS is defined and no SAPI name is specified, an instance
of the class named by REQUEST_CLASS will be created instead of the default for the
current SAPI.
| Name | Direction | Type | Description |
|---|---|---|---|
$sapi
|
in,optional | string | The name of the SAPI to return an instance for |
An instance of a request class matching the specified or default SAPI.