PHP Класс Pubwich, pubwich

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
_ ( 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

Приватные методы

Метод Описание
applyTheme ( ) : void Apply box and items templates

Описание методов

_() публичный Метод

Translate a string according to the defined locale/
public _ ( string $string ) : string
$string string
Результат string

getFooter() публичный статический Метод

* Footer hook
public static getFooter ( )

getHeader() публичный статический Метод

* Header hook
public static getHeader ( )

getLoop() публичный статический Метод

Displays the generated HTML code
public static getLoop ( ) : string
Результат string

getServices() публичный статический Метод

public static getServices ( ) : array
Результат array

getThemePath() публичный статический Метод

public static getThemePath ( ) : string
Результат string

getThemeUrl() публичный статический Метод

public static getThemeUrl ( ) : string
Результат string

init() публичный статический Метод

Application initialisation
public static init ( )

json_decode() публичный Метод

public json_decode ( string $str ) : object
$str string JSON-encoded object
Результат object PHP object

loadService() публичный статический Метод

Load a service file
public static loadService ( string $service, array $config ) : Service
$service string The service name
$config array The parameters
Результат Service

rebuildCache() публичный статический Метод

Rebuild the cache for each defined service
public static rebuildCache ( ) : void
Результат void

renderTemplate() публичный статический Метод

Renders the template according to the current theme
public static renderTemplate ( ) : void
Результат void

requireServiceFile() публичный статический Метод

Require a service file (according to the “cascade”)
public static requireServiceFile ( string $service ) : boolean
$service string Service
Результат boolean

setClasses() публичный статический Метод

Set the $classes array
public static setClasses ( ) : void
Результат void

setServices() публичный статический Метод

Set the services to use
public static setServices ( array $services = [] ) : void
$services array
Результат void

time_since() публичный статический Метод

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
Результат string