[ Index ] |
|
Code source de CakePHP 1.1.13.4450 |
[Code source] [Imprimer] [Statistiques]
Request object for handling alternative HTTP requests Alternative HTTP requests can come from wireless units like mobile phones, palmtop computers, and the like. These units have no use for Ajax requests, and this Component can tell how Cake should respond to the different needs of a handheld computer and a desktop machine.
Copyright: | Copyright 2005-2007, Cake Software Foundation, Inc. |
License: | http://www.opensource.org/licenses/mit-license.php The MIT License |
Version: | $Revision: 4409 $ |
Poids: | 412 lignes (11 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
RequestHandlerComponent:: (23 méthodes):
__construct()
startup()
setAjax()
isAjax()
isXml()
isRss()
isAtom()
isPost()
isPut()
isGet()
isDelete()
getAjaxVersion()
setContent()
getReferrer()
getClientIP()
isMobile()
stripWhitespace()
stripImages()
stripScripts()
stripAll()
stripTags()
accepts()
prefers()
Classe: RequestHandlerComponent - X-Ref
Request object for handling alternative HTTP requests__construct() X-Ref |
Constructor. Parses the accepted content types accepted by the client using HTTP_ACCEPT return: void |
startup(&$controller) X-Ref |
Startup param: object A reference to the controller return: null |
setAjax(&$controller) X-Ref |
Sets a controller's layout based on whether or not the current call is Ajax Add UTF-8 header for IE6 on XPsp2 bug if RequestHandlerComponent::isAjax() param: object The controller object return: null |
isAjax() X-Ref |
Returns true if the current call is from Ajax, false otherwise return: bool True if call is Ajax |
isXml() X-Ref |
Returns true if the current call accepts an XML response, false otherwise return: bool True if client accepts an XML response |
isRss() X-Ref |
Returns true if the current call accepts an RSS response, false otherwise return: bool True if client accepts an RSS response |
isAtom() X-Ref |
Returns true if the current call accepts an RSS response, false otherwise return: bool True if client accepts an RSS response |
isPost() X-Ref |
Returns true if the current call a POST request return: bool True if call is a POST |
isPut() X-Ref |
Returns true if the current call a PUT request return: bool True if call is a PUT |
isGet() X-Ref |
Returns true if the current call a GET request return: bool True if call is a GET |
isDelete() X-Ref |
Returns true if the current call a DELETE request return: bool True if call is a DELETE |
getAjaxVersion() X-Ref |
Gets Prototype version if call is Ajax, otherwise empty string. The Prototype library sets a special "Prototype version" HTTP header. return: string Prototype version of component making Ajax call |
setContent($name, $type) X-Ref |
Adds/sets the Content-type(s) for the given name param: string $name The name of the Content-type, i.e. "html", "xml", "css" param: mixed $type The Content-type or array of Content-types assigned to the name return: void |
getReferrer() X-Ref |
Gets the server name from which this request was referred return: string Server address |
getClientIP() X-Ref |
Gets remote client IP return: string Client IP address |
isMobile() X-Ref |
Returns true if user agent string matches a mobile web browser return: bool True if user agent is a mobile web browser |
stripWhitespace($str) X-Ref |
Strips extra whitespace from output param: string $str return: string |
stripImages($str) X-Ref |
Strips image tags from output param: string $str return: string |
stripScripts($str) X-Ref |
Strips scripts and stylesheets from output param: string $str return: string |
stripAll($str) X-Ref |
Strips extra whitespace, images, scripts and stylesheets from output param: string $str return: string |
stripTags() X-Ref |
Strips the specified tags from output return: string |
accepts($type = null) X-Ref |
Determines which content types the client accepts param: mixed $type Can be null (or no parameter), a string type name, or an return: mixed If null or no parameter is passed, returns an array of content |
prefers($type = null) X-Ref |
Determines which content types the client prefers returns: mixed param: mixed $type |
Généré le : Sun Feb 25 19:27:47 2007 | par Balluche grâce à PHPXref 0.7 |