PHP Класс PMA\libraries\Theme

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

Открытые свойства

Свойство Тип Описание
$filesize_info needed because sometimes, the mtime for different themes is identical
$id theme id
$img_path image path
$mtime_info last modification time for info file
$name theme name
$path theme path
$version theme version

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

Метод Описание
checkImgPath ( ) : boolean checks image path for existence - if not found use img from fallback theme
checkVersion ( string $version ) : boolean checks theme version against $version returns true if theme version is equal or higher to $version
getCssGradient ( string $start_color, string $end_color ) : string Generates code for CSS gradient using various browser extensions.
getFontSize ( ) : String Gets currently configured font size.
getId ( ) : string returns id
getImgPath ( string $file = null ) : string Returns the path to image for the theme.
getLayoutFile ( ) : string returns layout file
getName ( ) : string returns name
getPath ( ) : string returns path to theme
getPrintPreview ( ) : string Renders the preview for this theme
getSpriteData ( ) : array Loads sprites data
getVersion ( ) : string returns version
load ( string $folder ) : Theme | false returns theme object loaded from given folder or false if theme is invalid
loadCss ( ) : boolean load css (send to stdout, normally the browser)
loadInfo ( ) : boolean Loads theme information
setId ( string $id ) : void sets id
setImgPath ( string $path ) : void Sets path to images for the theme
setName ( string $name ) : void sets name
setPath ( string $path ) : void set path to theme
setVersion ( string $version ) : void sets version

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

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

checks image path for existence - if not found use img from fallback theme
public checkImgPath ( ) : boolean
Результат boolean

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

checks theme version against $version returns true if theme version is equal or higher to $version
public checkVersion ( string $version ) : boolean
$version string version to compare to
Результат boolean true if theme version is equal or higher to $version

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

Generates code for CSS gradient using various browser extensions.
public getCssGradient ( string $start_color, string $end_color ) : string
$start_color string Color of gradient start, hex value without #
$end_color string Color of gradient end, hex value without #
Результат string CSS code.

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

Gets currently configured font size.
public getFontSize ( ) : String
Результат String with font size.

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

returns id
public getId ( ) : string
Результат string id

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

If filename is given, it possibly fallbacks to fallback theme for it if image does not exist.
public getImgPath ( string $file = null ) : string
$file string file name for image
Результат string image path for this theme

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

returns layout file
public getLayoutFile ( ) : string
Результат string layout file

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

returns name
public getName ( ) : string
Результат string name

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

returns path to theme
public getPath ( ) : string
Результат string path to theme

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

Renders the preview for this theme
public getPrintPreview ( ) : string
Результат string

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

Loads sprites data
public getSpriteData ( ) : array
Результат array with sprites

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

returns version
public getVersion ( ) : string
Результат string version

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

returns theme object loaded from given folder or false if theme is invalid
public static load ( string $folder ) : Theme | false
$folder string path to theme
Результат Theme | false

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

load css (send to stdout, normally the browser)
public loadCss ( ) : boolean
Результат boolean

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

Loads theme information
public loadInfo ( ) : boolean
Результат boolean whether loading them info was successful or not

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

sets id
public setId ( string $id ) : void
$id string new id
Результат void

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

Sets path to images for the theme
public setImgPath ( string $path ) : void
$path string path to images for this theme
Результат void

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

sets name
public setName ( string $name ) : void
$name string name to set
Результат void

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

set path to theme
public setPath ( string $path ) : void
$path string path to theme
Результат void

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

sets version
public setVersion ( string $version ) : void
$version string version to set
Результат void

Описание свойств

$filesize_info публичное свойство

needed because sometimes, the mtime for different themes is identical
public $filesize_info

$id публичное свойство

theme id
public $id

$img_path публичное свойство

image path
public $img_path

$mtime_info публичное свойство

last modification time for info file
public $mtime_info

$name публичное свойство

theme name
public $name

$path публичное свойство

theme path
public $path

$version публичное свойство

theme version
public $version