App Directory >> CakePHP RSS + XML + Time by Ajay Anturkar
CakePHP RSS + XML + Time
RSS Helper
- The RSS helper makes generating XML for RSS feeds easy.
Sample View File
Time Helper
It allows for the quick processing of time related information. The Time Helper has two main tasks that it can perform:
It can format time strings.It can test time.
Uses "CakePHP i18n + l10n" component by Diogo ResendeDiogo Resende with some modifications
Functions
fromString( $date_string )toQuarter( $date_string, $range = false )toUnix( $date_string )toAtom( $date_string )toRSS( $date_string )nice( $date_string = null )niceShort( $date_string = null )daysAsSql( $begin, $end, $fieldName, $userOffset = NULL )dayAsSql( $date_string, $field_name )timeAgoInWords( $datetime_string, $options = array(), $backwards = null )gmt( $date_string = null )format( $format = 'd-m-Y', $date_string)
How to use Time Helper
XML Helper
The XML Helper simplifies the output of XML documents.
serialize($data, $options = array())
string elem (string $name, $attrib = array(), mixed $content = null, $endTag = true)
header(): This method is used to output the XML declaration


