Class Template

Description
  • abstract: This class manages our templates and loads them for display

Located in /template/Template.php (line 15)


	
			
Method Summary
void addView (string $template)
string body_id ()
string createAjaxUrl ([string $method = false], [array $bits = false], [string $module = false], [ $interface = false])
string createFormAction ([string $method = false])
void createLink (string $text, [string $method = false], [ $bits = false], [string $module = false], [string $title = false], [ $interface = false])
string createSelfLink ( $text, [array $bits = false], [string $method = false])
string createSelfUrl ([ $bits = false], [string $method = false], array $params)
string createUrl ([string $method = false], [array $bits = false], [string $module = false], [ $interface = false])
string createXhtmlValidSelfUrl ([ $bits = false], [string $method = false], array $params)
string createXhtmlValidUrl ([string $method = false], [array $bits = false], [string $module = false], [ $interface = false])
float daysBetween (datetime $start, datetime $end)
void display ([$data $data = false])
string encodeTextEntities (string $string)
mixed filterValue ([string $key = false])
void formatAddress ([ $add_1 = ''], [ $add_2 = ''], [ $city = ''], [ $state = ''], [ $zip = ''], [ $country = ''])
string getModuleTemplateDir ([ $module = false], [ $interface = false])
void getSelectOptions ([array $grabSelectArray = false], [mixed $match_value = false], [boolean $prepend_blank = false], [string $blank_text = false])
array getStateList ()
string getTemplateDir ()
array grabSelectArray (string $selectTable, string $selectField, [string $method = "ENUM"], [string $orderby = 'id'], [string $select_id = 'id'], [string $where = false])
void loadLanguageTerms ([array $terms = false])
string na (mixed $value, [string $replace = 'N/A'])
string niceDate (string $date, [string $date_format_string = "n/j/Y"], [mixed $empty_string = '-'], [boolean $date_only = false])
string sortLink (string $title, string $location, string $sort_by)
string text (string $key)
string truncateFilename (string $fileame, [integer $char_length = 25], [string $separator = '…'])
string truncateText (string $phrase, [integer $blurb_word_length = 40], [string $more_link = false])
Methods
Constructor __construct (line 47)
  • abstract: Contrucor, obtains an instance of the original app
  • access: public
Template __construct ()
addView (line 186)

Adds a template to the display stack, so when the display function is called, the templates will be output in the order they were added.

  • access: public
void addView (string $template)
  • string $template
body_id (line 466)
  • abstract: Returns a body id of the module/method
  • access: public
string body_id ()
createAjaxUrl (line 346)
  • abstract: Returns a properly-encoded URL using a module and method
  • access: public
string createAjaxUrl ([string $method = false], [array $bits = false], [string $module = false], [ $interface = false])
  • string $module
  • array $bits: Additional arguments to pass through the url
  • string $method
  • $interface
createFormAction (line 328)
  • abstract: Returns a properly-encoded URL using a method
  • access: public
string createFormAction ([string $method = false])
  • string $method
createLink (line 207)
  • abstract: Adds a new link
  • access: public
void createLink (string $text, [string $method = false], [ $bits = false], [string $module = false], [string $title = false], [ $interface = false])
  • string $title
  • string $module
  • string $method
  • string $text
  • $bits
  • $interface
createSelfLink (line 363)
  • abstract: Creates a link to the current page with params, replacing any existing params
  • access: public
string createSelfLink ( $text, [array $bits = false], [string $method = false])
  • array $bits
  • string $method
  • $text
createSelfUrl (line 409)
  • abstract: Creates a url to the current page with params, replacing any existing params
  • access: public
string createSelfUrl ([ $bits = false], [string $method = false], array $params)
  • array $params
  • string $method
  • $bits
createUrl (line 248)
  • abstract: Returns a URL using a module and method
  • access: public
string createUrl ([string $method = false], [array $bits = false], [string $module = false], [ $interface = false])
  • string $module
  • array $bits: Additional arguments to pass through the url
  • string $method
  • $interface
createXhtmlValidSelfUrl (line 386)
  • abstract: Creates an xhtml valid url to the current page with params, replacing any existing params
  • access: public
string createXhtmlValidSelfUrl ([ $bits = false], [string $method = false], array $params)
  • array $params
  • string $method
  • $bits
createXhtmlValidUrl (line 306)
  • abstract: Returns a properly-encoded URL using a module and method
  • access: public
string createXhtmlValidUrl ([string $method = false], [array $bits = false], [string $module = false], [ $interface = false])
  • string $module
  • array $bits: Additional arguments to pass through the url
  • string $method
  • $interface
daysBetween (line 624)
  • todo: This has no proper place, so it's here
  • abstract: Returns a count of days between two dates
  • access: public
float daysBetween (datetime $start, datetime $end)
  • datetime $start
  • datetime $end
display (line 115)
  • abstract: Display all templates that have been primed for output
  • access: public
void display ([$data $data = false])
  • $data $data: Array of data to be passed
encodeTextEntities (line 317)
  • abstract: Encodes entities that appear in text only, not html
  • access: public
string encodeTextEntities (string $string)
  • string $string
filterValue (line 530)
  • abstract: Returns a specific filter value from the GET params
  • access: public
mixed filterValue ([string $key = false])
  • string $key: The key of the filter value you want
formatAddress (line 739)
  • abstract: Formats a US address
  • access: public
void formatAddress ([ $add_1 = ''], [ $add_2 = ''], [ $city = ''], [ $state = ''], [ $zip = ''], [ $country = ''])
  • $add_1
  • $add_2
  • $city
  • $state
  • $zip
  • $country
getModuleTemplateDir (line 65)
  • abstract: Returns the template directory for our module
  • access: public
string getModuleTemplateDir ([ $module = false], [ $interface = false])
  • $module
  • $interface
getSelectOptions (line 701)
void getSelectOptions ([array $grabSelectArray = false], [mixed $match_value = false], [boolean $prepend_blank = false], [string $blank_text = false])
  • array $grabSelectArray
  • mixed $match_value
  • boolean $prepend_blank
  • string $blank_text
getStateList (line 767)
  • abstract: Return an array of US states
  • access: public
array getStateList ()
getTemplateDir (line 55)
  • abstract: Returns the template directory
  • access: public
string getTemplateDir ()
grabSelectArray (line 640)
array grabSelectArray (string $selectTable, string $selectField, [string $method = "ENUM"], [string $orderby = 'id'], [string $select_id = 'id'], [string $where = false])
  • string $selectTable
  • string $selectField
  • string $method
  • string $orderby
  • string $select_id
  • string $where
loadLanguageTerms (line 94)
  • abstract: Sets the language text array from the router
  • access: public
void loadLanguageTerms ([array $terms = false])
  • array $terms
loadModuleHeader (line 76)
  • abstract: Loads a header file for the currently loaded module, if that file exists
  • access: public
void loadModuleHeader ()
na (line 519)
  • abstract: Returns replacement text if a value is empty (i.e. "N/A")
  • access: public
string na (mixed $value, [string $replace = 'N/A'])
  • mixed $value
  • string $replace
niceDate (line 559)
  • abstract: Prints a nicer date display
  • access: public
string niceDate (string $date, [string $date_format_string = "n/j/Y"], [mixed $empty_string = '-'], [boolean $date_only = false])
  • string $date
  • string $date_format_string: The format to print the date, if needed
  • mixed $empty_string: What to print if the data is empty
  • boolean $date_only: Whether or not to display nice names or just dates
resetTemplateQueue (line 195)
  • abstract: Resets the template queue
  • access: public
void resetTemplateQueue ()
sortLink (line 432)
  • abstract: Creates a link for sorting a result set
  • access: public
string sortLink (string $title, string $location, string $sort_by)
  • string $title
  • string $location
  • string $sort_by
text (line 105)
  • abstract: Returns the text value for a key from the selected language
  • access: public
string text (string $key)
  • string $key
truncateFilename (line 507)
  • abstract: Truncates a filename leaving extension intact
  • access: public
string truncateFilename (string $fileame, [integer $char_length = 25], [string $separator = '…'])
  • string $fileame
  • integer $char_length
  • string $separator
truncateText (line 483)
  • abstract: Truncates a text block and adds a read more link
  • access: public
string truncateText (string $phrase, [integer $blurb_word_length = 40], [string $more_link = false])
  • string $phrase
  • integer $blurb_word_length
  • string $more_link

Documentation generated on Wed, 15 Apr 2009 17:03:41 -0700 by phpDocumentor 1.4.1