CakePHP docs

Id/Actions Category Code Examples Links Remarks
76 
View

The Time Helper 
Some common date-time methods are easier to manage. From SQL 
query string handling to rendering nicely formatted dates, this helper is 
useful for any Cake application that relies on time elements. 

To include this helper in the application, use this:
var $helpers = array('Time');

Table:  Time Helper Functions
Function            Description
=====            ===============================
$time->dayAsSql() Returns a partial SQL string to search for records 
between two times occurring on the same day
$time->daysAsSql() Returns a partial SQL string to search for records between two dates
$time->format() Returns a formatted date string; converts valid 
strtotime() strings or Unix timestamps
$time->fromString() Returns a Unix timestamp from a given valid 
strtotime() string or integer
$time->gmt() Converts a given Unix timestamp or valid strtotime() 
string to Greenwich mean time
$time->isThisMonth() Returns true if given datetime string is within this month
$time->isThisWeek() Returns true if given datetime string is within this week
$time->isThisYear() Returns true if given datetime string is within this year
$time->isToday() Returns true if given datetime string is today
$time->isTomorrow() Returns true if given datetime string is tomorrow
$time->nice() Formats a datetime string into a readable string
$time->niceShort() Like nice(), except it condenses the string to less words and digits
$time->relativeTime() Alias for timeAgoInWords(); can also calculate future dates
$time->timeAgoInWords() Compares the difference between a given 
datetime string and the current time; expresses the difference in past 
terms (for example, three days ago)
$time->toAtom() Formats date strings to be used in Atom feeds
$time->toQuarter() Returns the quarter for a given date
$time->toRSS() Formats date strings to be used in RSS feeds
$time->toUnix() Convenience wrapper for the strtotime() function
$time->wasWithinLast() Returns true if the given date is within the given interval
$time->wasYesterday() Returns true if given datetime string represents yesterday
 
   
77 
View

The XML Helper 
This helper can streamline some typical XML processes. 

To include this helper in the application, use this:
var $helpers = array('Xml');

Table: XML Helper Functions
Function     Description
=====     =================================
$xml->elem() Creates an XML element
$xml->header() Generates an XML document header
$xml->serialize() Converts a model result set, or a Cake-formatted array, into XML
 
   
78 
View

magic functions 
Values entered in the place of magic variable slots in the URL are 
passed to the action through the $this->params array. In the previous 
example, the given month would be available in the array as this:
$this->params['month']
and so forth. The $this->params array may be checked or called in the controller and the view.

The available magic functions include the following:
• $Action
• $Day
• $Month
• $Year
• $ID
 
   
79 
View

8 Built-in Components 
AclComponent
AuthComponent
CookieComponent
EmailComponent
PaginatorComponent
RequestHandlerComponent
SecurityComponent
SessionComponent
 
   

Page 6 of 6, showing 4 records out of 79 total, starting on record 76, ending on 79

| 1 | 2 | 3 | 4 | 5 | 6 | next >>

Actions