| [ Index ] |
PHP Cross Reference of Akelos Framework |
[Source view] [Print]
(no description)
| Author: | Bermi Ferrer |
| Copyright: | Copyright (c) 2002-2006, Akelos Media, S.L. http://www.akelos.org |
| License: | GNU Lesser General Public License |
| File Size: | 901 lines (28 kb) |
| Included or required: | 3 times |
| Referenced: | 0 times |
| Includes or requires: | 4 files AkLocaleManager.php AkRouter.php AkSession.php AkRequestMimeType.php |
AkRequest:: (67 methods):
_parseAkRequestString()
__construct()
init()
get()
getParams()
getAction()
getController()
reset()
set()
checkForRoutedRequests()
isValidControllerName()
isValidActionName()
isValidModuleName()
getParameters()
setPathParameters()
getPathParameters()
getUrlParams()
getQueryParameters()
getRequestParameters()
getRelativeUrlRoot()
getLocaleFromUrl()
getMethod()
isGet()
isPost()
isPut()
isDelete()
isHead()
getRemoteIp()
getDomain()
getSubdomains()
getRequestUri()
getProtocol()
isSsl()
getPath()
getPort()
getStandardPort()
getPortString()
getHostWithPort()
getHost()
getSession()
resetSession()
getCookies()
getEnv()
getServerSoftware()
isXmlHttpRequest()
xhr()
isAjax()
getRawPost()
_validateTechName()
_mergeRequest()
_getNormalizedFilesArray()
_addParam()
_fixGpcMagic()
_fixGpc()
_urlDecode()
_performUrlDecode()
getAccepts()
setFormat()
getFormat()
recognize()
_enableInternationalizationSupport()
_mapRoutes()
_connectToDatabase()
_startSession()
getPutParams()
getPutRequestData()
AkRequest()
| _parseAkRequestString($ak_request_string, $pattern = '/') X-Ref |
| String parse method. This method gets a petition as parameter, using the "Ruby on Rails" request format (see prettyURL in RoR documentation). The format is: file.php?ak=/controller/action/id¶mN=valueN This method requires for a previous execution of the _mergeRequest() method, in order to merge all the request all i one array. This method expands dynamically the class Request, adding a public property for every parameter sent in the request. return: array |
| __construct() X-Ref |
| No description |
| init() X-Ref |
| Initialization method. Initialization method. Use this via the class constructor. return: void |
| get($var_name) X-Ref |
| No description |
| getParams() X-Ref |
| No description |
| getAction() X-Ref |
| No description |
| getController() X-Ref |
| No description |
| reset() X-Ref |
| No description |
| set($variable, $value) X-Ref |
| No description |
| checkForRoutedRequests(&$Router) X-Ref |
| No description |
| isValidControllerName($controller_name) X-Ref |
| No description |
| isValidActionName($action_name) X-Ref |
| No description |
| isValidModuleName($module_name) X-Ref |
| No description |
| getParameters() X-Ref |
| Returns both GET and POST parameters in a single array. |
| setPathParameters($parameters) X-Ref |
| No description |
| getPathParameters() X-Ref |
| No description |
| getUrlParams() X-Ref |
| No description |
| getQueryParameters() X-Ref |
| Must be implemented in the concrete request |
| getRequestParameters() X-Ref |
| No description |
| getRelativeUrlRoot() X-Ref |
| Returns the path minus the web server relative installation directory. This method returns null unless the web server is apache. |
| getLocaleFromUrl() X-Ref |
| Returns the locale identifier of current URL |
| getMethod() X-Ref |
| Returns the HTTP request method as a lowercase symbol ('get, for example) |
| isGet() X-Ref |
| Is this a GET request? Equivalent to $Request->getMethod() == 'get' |
| isPost() X-Ref |
| Is this a POST request? Equivalent to $Request->getMethod() == 'post' |
| isPut() X-Ref |
| Is this a PUT request? Equivalent to $Request->getMethod() == 'put' |
| isDelete() X-Ref |
| Is this a DELETE request? Equivalent to $Request->getMethod() == 'delete' |
| isHead() X-Ref |
| Is this a HEAD request? Equivalent to $Request->getMethod() == 'head' |
| getRemoteIp() X-Ref |
| Determine originating IP address. REMOTE_ADDR is the standard but will fail if( the user is behind a proxy. HTTP_CLIENT_IP and/or HTTP_X_FORWARDED_FOR are set by proxies so check for these before falling back to REMOTE_ADDR. HTTP_X_FORWARDED_FOR may be a comma- delimited list in the case of multiple chained proxies; the first is the originating IP. |
| getDomain($tld_length = 1) X-Ref |
| Returns the domain part of a host, such as akelos.com in 'www.akelos.com'. You can specify a different <tt>tld_length</tt>, such as 2 to catch akelos.co.uk in 'www.akelos.co.uk'. |
| getSubdomains($tld_length = 1) X-Ref |
| Returns all the subdomains as an array, so ['dev', 'www'] would be returned for 'dev.www.akelos.com'. You can specify a different <tt>tld_length</tt>, such as 2 to catch ['www'] instead of ['www', 'akelos'] in 'www.akelos.co.uk'. |
| getRequestUri() X-Ref |
| Returns the request URI correctly |
| getProtocol() X-Ref |
| Return 'https://' if( this is an SSL request and 'http://' otherwise. |
| isSsl() X-Ref |
| Is this an SSL request? |
| getPath() X-Ref |
| Returns the interpreted path to requested resource |
| getPort() X-Ref |
| Returns the port number of this request as an integer. |
| getStandardPort() X-Ref |
| Returns the standard port number for this request's protocol |
| getPortString() X-Ref |
| Returns a port suffix like ':8080' if( the port number of this request is not the default HTTP port 80 or HTTPS port 443. |
| getHostWithPort() X-Ref |
| Returns a host:port string for this request, such as example.com or example.com:8080. |
| getHost() X-Ref |
| No description |
| getSession() X-Ref |
| No description |
| resetSession() X-Ref |
| No description |
| getCookies() X-Ref |
| No description |
| getEnv() X-Ref |
| No description |
| getServerSoftware() X-Ref |
| No description |
| isXmlHttpRequest() X-Ref |
| Returns true if the request's 'X-Requested-With' header contains 'XMLHttpRequest'. (The Prototype Javascript library sends this header with every Ajax request.) |
| xhr() X-Ref |
| No description |
| isAjax() X-Ref |
| No description |
| getRawPost() X-Ref |
| Receive the raw post data. This is useful for services such as REST, XMLRPC and SOAP which communicate over HTTP POST but don't use the traditional parameter format. |
| _validateTechName($name) X-Ref |
| No description |
| _mergeRequest() X-Ref |
| Populates $this->_request attribute with incoming request in the following precedence: $_SESSION['request'] <- This will override options provided by previous methods $_COOKIE $_POST $_GET Command line params return: void Void returned. Modifies the private property " |
| _getNormalizedFilesArray($params = null, $first_call = true) X-Ref |
| No description |
| _addParam($variable, $value) X-Ref |
| Builds (i.e., "expands") the Request class for accessing the request parameters as public properties. For example, when the requests is "ak=/controller/action/id¶meter=value", once parsed, you can access the parameters of the request just like an object, e.g.: $value_to_get = $request->parameter return: void |
| _fixGpcMagic() X-Ref |
| Correct double-escaping problems caused by "magic quotes" in some PHP installations. |
| _fixGpc(&$item) X-Ref |
| No description |
| _urlDecode() X-Ref |
| No description |
| _performUrlDecode(&$item) X-Ref |
| No description |
| getAccepts() X-Ref |
| No description |
| setFormat($format) X-Ref |
| No description |
| getFormat() X-Ref |
| No description |
| recognize($Map = null) X-Ref |
| Recognizes a Request and returns the responsible controller instance return: AkActionController |
| _enableInternationalizationSupport() X-Ref |
| No description |
| _mapRoutes($Map = null) X-Ref |
| No description |
| _connectToDatabase() X-Ref |
| No description |
| _startSession() X-Ref |
| No description |
| getPutParams() X-Ref |
| No description |
| getPutRequestData() X-Ref |
| No description |
| AkRequest() X-Ref |
| No description |
| Generated: Mon Oct 27 12:43:49 2008 | Cross-referenced by PHPXref 0.6 |