Cakephp Classroom image

osdyui
 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20|Last
Lessons:-Controllers

• is(’post’) Check to see if the current request is a POST.
• is(’delete’) Check to see if the current request is a DELETE.
• is(’head’) Check to see if the current request is HEAD.
• is(’options’) Check to see if the current request is OPTIONS.
• is(’ajax’) Check to see of the current request came with X-Requested-with = XmlHttpRequest.
• is(’ssl’) Check to see if the request is via SSL
• is(’flash’) Check to see if the request has a User-Agent of Flash
• is(’mobile’) Check to see if the request came from a common list of mobile agents.
CakeRequest and RequestHandlerComponent
Since many of the features CakeRequest offers used to be the realm of RequestHandlerComponent
some rethinking was required to figure out how it still fits into the picture. For 2.0,
RequestHandlerComponent acts as a sugar daddy. Providing a layer of sugar on top of the utility
CakeRequest affords. Sugar like switching layout and views based on content types or ajax is the domain
of RequestHandlerComponent. This separation of utility and sugar between the two classes lets you
more easily pick and choose what you want and what you need.
Interacting with other aspects of the request
You can use CakeRequest to introspect a variety of things about the request. Beyond the detectors, you can
also find out other information from various properties and methods.
• $this->request->webroot contains the webroot directory.
• $this->request->base contains the base path.
• $this->request->here contains the full address to the current request
• $this->request->query contains the query string parameters.
CakeRequest API
class CakeRequest
CakeRequest encapsulates request parameter handling, and introspection.
CakeRequest::domain($tldLength = 1)
Returns the domain name your application is running on.
CakeRequest::subdomains($tldLength = 1)
Returns the subdomains your application is running on as an array.
CakeRequest::host()
Returns the host your application is on.

 
 
 

osdyui

Skills    Cakephp

Qualifications :-
Location :-,,,
Description:-
Explore
 

  Students (0)