PHPDevShell 3.1.3-Stable
PHP OOP RAD Development Framework
PHPDS_template Class Reference
Inheritance diagram for PHPDS_template:
PHPDS_dependant

Public Member Functions

 runTemplate ()
 addCssFileToHead ($cssRelativePath= '', $media='screen, projection')
 addJsFileToHead ($jsRelativePath= '')
 addToHead ($giveHead= '')
 addJsToHead ($js= '')
 addCSSToHead ($css= '')
 outputHead ($return=false)
 outputLanguage ($return=false)
 outputCharset ($return=false)
 outputTitle ()
 outputName ()
 outputSkin ($return= 'print')
 outputAbsoluteURL ($return= 'print')
 outputMetaKeywords ($return= 'print')
 outputMetaDescription ($return= 'print')
 modPrint ($moduleName)
 outputLogo ()
 scriptLogo ($menu_link, $active_plugin, $alias=null, $is_parent=null)
 outputTime ()
 outputLoginLink ()
 outputRole ()
 outputGroup ()
 outputScriptIcon ($return=false)
 outputBreadcrumbs ()
 outputMenu ()
 outputScript ()
 outputController ()
 outputTextLogo ()
 outputFooter ()
 outputFooterJS ()
 requestWidget ($menu_id_to_load, $element_id, $extend_url= '', $settings= '')
 requestAjax ($menu_id_to_load, $element_id, $extend_url= '', $settings= '')
 requestLightbox ($menu_id_to_load, $element_id, $extend_url= '', $settings= '')
 heading ($heading, $return= 'print')
 info ($information, $return= 'print')
 icon ($name, $title=false, $size=16, $class='icon', $type='.png', $return=true)
 warning ($warning, $return= 'print', $log= 'log')
 ok ($ok, $return= 'print', $log= 'log')
 error ($error, $return= 'print', $log= 'log')
 critical ($critical, $return= 'print', $log= 'log', $mail= 'mailadmin')
 notice ($notice, $return= 'print')
 busy ($busy, $return= 'print')
 message ($message, $return= 'print')
 note ($note, $return= 'print')
 scripthead ($scripthead, $return= 'print')
 tip ($text, $print=false)
 extendMenuLoop ($extended_menu_id)
 executeController ()
 loadControllerFile ($menu_id, $include_model=false)
 loginFormHeading ($return=false)
 loginForm ($return=false)
 getTemplate ()
 getTpl ($load_view=false, $plugin_override=false)
 debugInfo ()
 htmlEntityDecode ($string_to_decode)
 getPiece ($name, $module=false)
 setPiece ($name, $data=null)
 outputNotifications ()

Data Fields

 $HTML = ''
 $HOOK = ''
 $view
 $modifyHead = ''
 $modifyOutputTextLogo = false
 $modifyOutputLogo = false
 $modifyOutputTime = false
 $modifyOutputLoginLink = false
 $modifyOutputUser = false
 $modifyOutputRole = false
 $modifyOutputGroup = false
 $modifyOutputTitle = false
 $modifyOutputMenu = false
 $modifyOutputBreadcrumbs = false
 $modifyOutputFooter = false
 $modifyOutputController = false
 $controller
 $lightbox = false
 $stopScript
 $debugStr = false
 $global
 $skipLogin = false
 $module = array()
 $templateName
 $themeName
 $loginMessage
 $mod

Protected Member Functions

 startBuffering ()

Protected Attributes

 $pieces
 $CDN

Member Function Documentation

addCssFileToHead ( cssRelativePath = '',
media = 'screen,
projection'   
)

Will add any css path to the <head></head> tags of your document.

Parameters:
string$cssRelativePath
addCSSToHead ( css = '')

Will add any css to the <head></head> tags of your document adding script tags.

Parameters:
string$css
addJsFileToHead ( jsRelativePath = '')

Will add any js path to the <head></head> tags of your document.

Parameters:
string$jsRelativePath
addJsToHead ( js = '')

Will add any js to the <head></head> tags of your document adding script tags.

Parameters:
string$js
addToHead ( giveHead = '')

Will add any content to the <head></head> tags of your document.

Parameters:
string$extraHead
busy ( busy,
return = 'print' 
)

This returns/prints a busy of the script being executed. Intended to be used by the developer.

Parameters:
stringThis is the message that will be displayed.
mixeddefault is print, can be set true, print, return.
Returns:
string Busy string.
Author:
Jason Schoeman
critical ( critical,
return = 'print',
log = 'log',
mail = 'mailadmin' 
)

This returns/prints a critical message regarding the active script. Intended to be used by the developer.

Parameters:
stringThis is the message that will be displayed.
mixeddefault is print, can be set true, print, return.
mixeddefault is log, can be set true, print, return.
Returns:
string Critical string.
Author:
Jason Schoeman
debugInfo ( )

Prints some debug info to the frontend.

error ( error,
return = 'print',
log = 'log' 
)

This returns/prints a error message regarding the active script. Intended to be used by the developer where exceptions are caught.

Parameters:
stringThis is the message that will be displayed.
mixeddefault is print, can be set true, print, return.
mixeddefault is log, can be set true, print, return.
Returns:
string Error string.
Author:
Jason Schoeman
executeController ( )

Executes the controller.

Author:
Jason Schoeman
extendMenuLoop ( extended_menu_id)

This function support output_script by looking deeper into menu structure to find last linked menu item that is not linked to another.

Parameters:
integer$extended_menu_id
Returns:
integer
getPiece ( name,
module = false 
)

returns a piece from the repository, optionnaly throught a module

Version:
1.0
Since:
v3.1.0
Author:
greg <greg@phpdevshell.org>
Date:
20110309 (v1.0) (greg) added
Parameters:
$namestring, the name of the piece to fetch
$modulestring or boolean, (optionnal) the name of the module to use, true to use a module with the piece name, false not to use a module
getTemplate ( )

Get and return the supposed to run template.

Returns:
string if not found, return default.
Author:
Jason Schoeman
getTpl ( load_view = false,
plugin_override = false 
)

Gets the correct location of a tpl file, will return full path, can be a view.tpl or view.tpl.php files.

Parameters:
string$load_view
string$plugin_overrideIf another plugin is to be used in the directory.
heading ( heading,
return = 'print' 
)

This returns/prints a heading discription of the script being executed. Intended to be used by the developer.

Version:
1.1
Date:
20110309 (v1.1) (greg) changed to use the pieces repository
20110309 (v1.2) (jason) good idea but it wont work as heading is not mandatory in controllers.
Parameters:
stringThis is the message that will be displayed as the heading.
Returns:
nothing
Author:
Jason Schoeman
htmlEntityDecode ( string_to_decode)

Convert all HTML entities to their applicable characters.

Parameters:
string$string_to_decode
Returns:
string
icon ( name,
title = false,
size = 16,
class = 'icon',
type = '.png',
return = true 
)

This method will load given png icon from icon database,

Parameters:
stringIcon name without extention.
Titleof given image.
intThe size folder to look within.
stringIf an alternative class must be added to image.
stringFile type.
booleanDefault is false, if set true, the heading will return instead of print.
info ( information,
return = 'print' 
)

This returns/prints info of the script being executed. Intended to be used by the developer.

Version:
1.1
Date:
20110309 (v1.1) (greg) changed to use the pieces repository
20110309 (v1.2) (jason) good idea but it wont work as info is not mandatory in controllers.
Parameters:
stringThis is the message that will be displayed as the info.
Returns:
nothing
Author:
Jason Schoeman
loadControllerFile ( menu_id,
include_model = false 
)

Will attempt to load controller file from various locations.

Version:
1.0.1
Date:
20100917 (v1.0) (Jason)
20110308 (v1.0.1) (greg) loadFile returns an exact false when the file is not found
Author:
Jason Schoeman
Parameters:
int
loginForm ( return = false)

Executes the login.

Author:
Jason Schoeman
loginFormHeading ( return = false)

Login heading messages.

Author:
Jason Schoeman
message ( message,
return = 'print' 
)

This returns/prints a message of the script being executed. Intended to be used by the developer.

Parameters:
stringThis is the message that will be displayed.
mixeddefault is print, can be set true, print, return.
Returns:
string Message string.
Author:
Jason Schoeman
modPrint ( moduleName)

Print a string via a module and returns the result

Parameters:
string$moduleNamethe module to use
string$stringthe string to print (several strings can be provided)
Date:
20100920 (v1.0) (greg) created
Version:
1.0
Author:
greg
note ( note,
return = 'print' 
)

This returns/prints a note of the script being executed. Intended to be used by the developer.

Parameters:
stringThis is the message that will be displayed.
mixeddefault is print, can be set true, print, return.
Returns:
string Note string.
Author:
Jason Schoeman
notice ( notice,
return = 'print' 
)

This returns/prints a notice of the script being executed. Intended to be used by the developer.

Parameters:
stringThis is the message that will be displayed.
mixeddefault is print, can be set true, print, return.
Returns:
string Notice string.
Author:
Jason Schoeman
ok ( ok,
return = 'print',
log = 'log' 
)

This returns/prints a ok message regarding the active script. Intended to be used by the developer.

Parameters:
stringThis is the message that will be displayed.
mixeddefault is print, can be set true, print, return.
mixeddefault is log, can be set true, print, return.
Returns:
string Ok string.
Author:
Jason Schoeman
outputAbsoluteURL ( return = 'print')

This returns/prints the absolute url for inside theme usage.

Parameters:
mixeddefault is print, can be set true, print, return.
Returns:
string Absolute url.
Author:
Jason Schoeman
outputBreadcrumbs ( )

Returns "breadcrumbs" to the template system. Intended to be used by the engine.

Author:
Jason Schoeman
outputCharset ( return = false)

Outputs charset.

Author:
Jason Schoeman
outputController ( )

Returns "output script" to the template system. Intended to be used by the engine.

Author:
Jason Schoeman
outputFooter ( )

Returns the last footer string to the template system. Intended to be used by the engine.

Author:
Jason Schoeman
outputFooterJS ( )

Will add code from configuration to theme closing body tag.

Author:
Jason Schoeman
outputGroup ( )

Sets template group.

Author:
Jason Schoeman
outputHead ( return = false)

Changes head output.

Parameters:
boolean$return
Returns:
string
outputLanguage ( return = false)

Outputs current language identifier being used.

Author:
Jason Schoeman
outputLoginLink ( )

Sets template login link.

Author:
Jason Schoeman
outputLogo ( )

Gets the desired logo and displays it. This method will try its best to deliver a logo, whatever the case.

Author:
Jason Schoeman
outputMenu ( )

Returns "menus" to the template system. Intended to be used by the engine.

Author:
Jason Schoeman
outputMetaDescription ( return = 'print')

This returns/prints the meta description for inside theme usage.

Parameters:
mixeddefault is print, can be set true, print, return.
Returns:
string Meta Description.
Author:
Jason Schoeman
outputMetaKeywords ( return = 'print')

This returns/prints the meta keywords for inside theme usage.

Parameters:
mixeddefault is print, can be set true, print, return.
Returns:
string Meta Keywords.
Author:
Jason Schoeman
outputName ( )

Outputs the active scripts title.

Author:
Jason Schoeman
outputNotifications ( )

Ability to call and display notifications pushed to the notification system.

Version:
1.0
Since:
v3.0.5
Date:
20110706 (v1.0) (greg) added
outputRole ( )

Sets template role.

Author:
Jason Schoeman
outputScript ( )

Returns "output script" to the template system. Intended to be used by the engine.

Author:
Jason Schoeman
outputScriptIcon ( return = false)

This returns/prints an image of the current script running.

Parameters:
booleanDefault is false, if set true, the heading will return instead of print.
Returns:
string Returns image tag with image url.
Author:
Jason Schoeman
outputSkin ( return = 'print')

This returns/prints the skin for inside theme usage.

Parameters:
mixeddefault is print, can be set true, print, return.
Returns:
string Skin.
Author:
Jason Schoeman
outputTextLogo ( )

Sets template system logo or name.

Author:
Jason Schoeman
outputTime ( )

Sets template time.

Author:
Jason Schoeman
outputTitle ( )

Outputs the active scripts title.

Author:
Jason Schoeman
requestAjax ( menu_id_to_load,
element_id,
extend_url = '',
settings = '' 
)

This method is used to load ajax into a certain location of your page.

Author:
Jason Schoeman
Since:
V 3.0.5
requestLightbox ( menu_id_to_load,
element_id,
extend_url = '',
settings = '' 
)

This method is used to load a lightbox page.

Author:
Jason Schoeman
Since:
V 3.0.5
requestWidget ( menu_id_to_load,
element_id,
extend_url = '',
settings = '' 
)

This method is used to load a widget at into a certain location of your page.

Author:
Jason Schoeman
Since:
V 3.0.5
runTemplate ( )

Run default, custom or no template.

Version:
1.2
Date:
20100520 (v1.1) (greg) added merging with modules from the configuration array
20110308 (v1.2) greg) allows the new style controller to alter the current template to be used
Author:
Jason Schoeman
scripthead ( scripthead,
return = 'print' 
)

This returns/prints a heading of the script being executed. Intended to be used by the developer.

Parameters:
stringThis is the message that will be displayed.
mixeddefault is print, can be set true, print, return.
Returns:
string Heading string.
Author:
Jason Schoeman
scriptLogo ( menu_link,
active_plugin,
alias = null,
is_parent = null 
)

Acquire script identification image or logo.

Parameters:
string$menu_link
string$active_plugin
string$alias
int$is_parent
setPiece ( name,
data = null 
)

insert a piece into the repository

Version:
1.0
Since:
v3.1.0
Author:
greg <greg@phpdevshell.org>
Date:
20110309 (v1.0) (greg) added
Parameters:
$namestring, the name of the piece to add
$datastring, the raw content of the piece
startBuffering ( ) [protected]

OB Start

tip ( text,
print = false 
)

This creates an the [i] when over with mouse a popup with a message appears, this can be placed anywhere. Intended to be used by the developer.

Parameters:
stringThe message to diplay when mouse goes over the [i].
booleanSets to print out confirm link instead of return.
Author:
Jason Schoeman
warning ( warning,
return = 'print',
log = 'log' 
)

This returns/prints a warning message regarding the active script. Intended to be used by the developer.

Parameters:
stringThis is the message that will be displayed.
mixeddefault is print, can be set true, print, return.
mixeddefault is log, can be set true, print, return.
Returns:
string Warning string.
Author:
Jason Schoeman

Field Documentation

$CDN [protected]
$controller
$debugStr = false
$global
$HOOK = ''
$HTML = ''
$lightbox = false
$loginMessage
$mod
$modifyHead = ''
$modifyOutputBreadcrumbs = false
$modifyOutputController = false
$modifyOutputFooter = false
$modifyOutputGroup = false
$modifyOutputLoginLink = false
$modifyOutputLogo = false
$modifyOutputMenu = false
$modifyOutputRole = false
$modifyOutputTextLogo = false
$modifyOutputTime = false
$modifyOutputTitle = false
$modifyOutputUser = false
$module = array()
$pieces [protected]
$skipLogin = false
$stopScript
$templateName
$themeName
$view

The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Enumerations