PHP Class Pubwich, pubwich

Datei anzeigen Open project: remiprev/pubwich Class Usage Examples

Public Methods

Method Description
_ ( string $string ) : string Translate a string according to the defined locale/
getFooter ( ) * Footer hook
getHeader ( ) * Header hook
getLoop ( ) : string Displays the generated HTML code
getServices ( ) : array
getThemePath ( ) : string
getThemeUrl ( ) : string
init ( ) Application initialisation
json_decode ( string $str ) : object
loadService ( string $service, array $config ) : Service Load a service file
rebuildCache ( ) : void Rebuild the cache for each defined service
renderTemplate ( ) : void Renders the template according to the current theme
requireServiceFile ( string $service ) : boolean Require a service file (according to the “cascade”)
setClasses ( ) : void Set the $classes array
setServices ( array $services = [] ) : void Set the services to use
time_since ( $original ) : string Return a date in a relative format Based on: http://snippets.dzone.com/posts/show/5565

Private Methods

Method Description
applyTheme ( ) : void Apply box and items templates

Method Details

_() public method

Translate a string according to the defined locale/
public _ ( string $string ) : string
$string string
return string

getFooter() public static method

* Footer hook
public static getFooter ( )

getHeader() public static method

* Header hook
public static getHeader ( )

getLoop() public static method

Displays the generated HTML code
public static getLoop ( ) : string
return string

getServices() public static method

public static getServices ( ) : array
return array

getThemePath() public static method

public static getThemePath ( ) : string
return string

getThemeUrl() public static method

public static getThemeUrl ( ) : string
return string

init() public static method

Application initialisation
public static init ( )

json_decode() public method

public json_decode ( string $str ) : object
$str string JSON-encoded object
return object PHP object

loadService() public static method

Load a service file
public static loadService ( string $service, array $config ) : Service
$service string The service name
$config array The parameters
return Service

rebuildCache() public static method

Rebuild the cache for each defined service
public static rebuildCache ( ) : void
return void

renderTemplate() public static method

Renders the template according to the current theme
public static renderTemplate ( ) : void
return void

requireServiceFile() public static method

Require a service file (according to the “cascade”)
public static requireServiceFile ( string $service ) : boolean
$service string Service
return boolean

setClasses() public static method

Set the $classes array
public static setClasses ( ) : void
return void

setServices() public static method

Set the services to use
public static setServices ( array $services = [] ) : void
$services array
return void

time_since() public static method

Return a date in a relative format Based on: http://snippets.dzone.com/posts/show/5565
public static time_since ( $original ) : string
$original Date timestamp
return string