PHP Class PMA\libraries\Theme

Afficher le fichier Open project: phpmyadmin/phpmyadmin Class Usage Examples

Méthodes publiques

Свойство Type Description
$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

Méthodes publiques

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

Method Details

checkImgPath() public méthode

checks image path for existence - if not found use img from fallback theme
public checkImgPath ( ) : boolean
Résultat boolean

checkVersion() public méthode

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
Résultat boolean true if theme version is equal or higher to $version

getCssGradient() public méthode

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 #
Résultat string CSS code.

getFontSize() public méthode

Gets currently configured font size.
public getFontSize ( ) : String
Résultat String with font size.

getId() public méthode

returns id
public getId ( ) : string
Résultat string id

getImgPath() public méthode

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
Résultat string image path for this theme

getLayoutFile() public méthode

returns layout file
public getLayoutFile ( ) : string
Résultat string layout file

getName() public méthode

returns name
public getName ( ) : string
Résultat string name

getPath() public méthode

returns path to theme
public getPath ( ) : string
Résultat string path to theme

getPrintPreview() public méthode

Renders the preview for this theme
public getPrintPreview ( ) : string
Résultat string

getSpriteData() public méthode

Loads sprites data
public getSpriteData ( ) : array
Résultat array with sprites

getVersion() public méthode

returns version
public getVersion ( ) : string
Résultat string version

load() public static méthode

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
Résultat Theme | false

loadCss() public méthode

load css (send to stdout, normally the browser)
public loadCss ( ) : boolean
Résultat boolean

loadInfo() public méthode

Loads theme information
public loadInfo ( ) : boolean
Résultat boolean whether loading them info was successful or not

setId() public méthode

sets id
public setId ( string $id ) : void
$id string new id
Résultat void

setImgPath() public méthode

Sets path to images for the theme
public setImgPath ( string $path ) : void
$path string path to images for this theme
Résultat void

setName() public méthode

sets name
public setName ( string $name ) : void
$name string name to set
Résultat void

setPath() public méthode

set path to theme
public setPath ( string $path ) : void
$path string path to theme
Résultat void

setVersion() public méthode

sets version
public setVersion ( string $version ) : void
$version string version to set
Résultat void

Property Details

$filesize_info public_oe property

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

$id public_oe property

theme id
public $id

$img_path public_oe property

image path
public $img_path

$mtime_info public_oe property

last modification time for info file
public $mtime_info

$name public_oe property

theme name
public $name

$path public_oe property

theme path
public $path

$version public_oe property

theme version
public $version