PHP Class Pubwich, pubwich

Afficher le fichier Open project: remiprev/pubwich Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
applyTheme ( ) : void Apply box and items templates

Method Details

_() public méthode

Translate a string according to the defined locale/
public _ ( string $string ) : string
$string string
Résultat string

getFooter() public static méthode

* Footer hook
public static getFooter ( )

getHeader() public static méthode

* Header hook
public static getHeader ( )

getLoop() public static méthode

Displays the generated HTML code
public static getLoop ( ) : string
Résultat string

getServices() public static méthode

public static getServices ( ) : array
Résultat array

getThemePath() public static méthode

public static getThemePath ( ) : string
Résultat string

getThemeUrl() public static méthode

public static getThemeUrl ( ) : string
Résultat string

init() public static méthode

Application initialisation
public static init ( )

json_decode() public méthode

public json_decode ( string $str ) : object
$str string JSON-encoded object
Résultat object PHP object

loadService() public static méthode

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

rebuildCache() public static méthode

Rebuild the cache for each defined service
public static rebuildCache ( ) : void
Résultat void

renderTemplate() public static méthode

Renders the template according to the current theme
public static renderTemplate ( ) : void
Résultat void

requireServiceFile() public static méthode

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

setClasses() public static méthode

Set the $classes array
public static setClasses ( ) : void
Résultat void

setServices() public static méthode

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

time_since() public static méthode

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
Résultat string