pluf/src/Pluf/Template.php File Reference


Classes

class  Pluf_Template

Functions

 Pluf_Template_unsafe ($string)
 Pluf_Template_htmlspecialchars ($string)
 Pluf_Template_dateFormat ($date, $format='%b%e,%Y')
 Pluf_Template_timeFormat ($time, $format='Y-m-d H:i:s')
 Pluf_Template_safeEcho ($mixed, $echo=true)
 Pluf_Template_nl2br ($mixed)
 Pluf_Template_varExport ($mixed)
 Pluf_Template_dateAgo ($date, $f='withal')
 Pluf_Template_timeAgo ($date, $f="withal")
 Pluf_Template_safeEmail ($email)

Function Documentation

Pluf_Template_dateAgo ( date,
f = 'withal' 
)

Display the date in a "6 days, 23 hours ago" style.

Pluf_Template_dateFormat ( date,
format = '%b %e,
%Y'   
)

Modifier plugin: Convert the date from GMT to local and format it.

This is used as all the datetime are stored in GMT in the database.

Parameters:
string $date input date string considered GMT
string $format strftime format for output ('b e, Y')
Returns:
string date in localtime

Pluf_Template_htmlspecialchars ( string  ) 

Special htmlspecialchars that can handle the objects.

Parameters:
string String proceeded by htmlspecialchars
Returns:
string String like if htmlspecialchars was not applied

Pluf_Template_nl2br ( mixed  ) 

New line to
returning a safe string.

Parameters:
mixed Input
Returns:
string Safe to display in HTML.

Pluf_Template_safeEcho ( mixed,
echo = true 
)

Special echo function that checks if the string to output is safe or not, if not it is escaped.

Parameters:
mixed Input
Returns:
string Safe to display in HTML.

Pluf_Template_safeEmail ( email  ) 

Hex encode an email excluding the "mailto:".

Pluf_Template_timeAgo ( date,
f = "withal" 
)

Display the time in a "6 days, 23 hours ago" style.

Pluf_Template_timeFormat ( time,
format = 'Y-m-d H:i:s' 
)

Modifier plugin: Format a unix time.

Warning: date format is directly to be used, not consideration of GMT or local time.

Parameters:
int $time input date string considered GMT
string $format strftime format for output ('Y-m-d H:i:s')
Returns:
string formated time

Pluf_Template_unsafe ( string  ) 

Set a string to be safe for display.

Parameters:
string String to be safe for display.
Returns:
string Pluf_Template_SafeString

Pluf_Template_varExport ( mixed  ) 

Var export returning a safe string.

Parameters:
mixed Input
Returns:
string Safe to display in HTML.


Generated on Wed Feb 3 15:44:51 2010 for Pluf by  doxygen