class Theme

handles theme

Properties

string $version
string $name
string $id
string $path
string $img_path
integer $mtime_info
integer $filesize_info needed because sometimes, the mtime for different themes is identical
array $_cssFiles
Template $template

Methods

__construct()

Theme constructor.

boolean
loadInfo()

Loads theme information

static Theme|false
load(string $folder)

returns theme object loaded from given folder or false if theme is invalid

bool
checkImgPath()

checks image path for existence - if not found use img from fallback theme

string
getPath()

returns path to theme

void
setPath(string $path)

set path to theme

void
setVersion(string $version)

sets version

string
getVersion()

returns version

boolean
checkVersion(string $version)

checks theme version against $version returns true if theme version is equal or higher to $version

void
setName(string $name)

sets name

string
getName()

returns name

void
setId(string $id)

sets id

string
getId()

returns id

void
setImgPath(string $path)

Sets path to images for the theme

string
getImgPath(string $file = null, string $fallback = null)

Returns the path to image for the theme.

string
getPrintPreview()

Renders the preview for this theme

Details

at line 95
__construct()

Theme constructor.

at line 106
boolean loadInfo()

Loads theme information

Return Value

boolean whether loading them info was successful or not

at line 165
static Theme|false load(string $folder)

returns theme object loaded from given folder or false if theme is invalid

Parameters

string $folder path to theme

Return Value

Theme|false

at line 186
bool checkImgPath()

checks image path for existence - if not found use img from fallback theme

Return Value

bool

at line 218
string getPath()

returns path to theme

Return Value

string path to theme

at line 231
void setPath(string $path)

set path to theme

Parameters

string $path path to theme

Return Value

void

at line 244
void setVersion(string $version)

sets version

Parameters

string $version version to set

Return Value

void

at line 255
string getVersion()

returns version

Return Value

string version

at line 269
boolean checkVersion(string $version)

checks theme version against $version returns true if theme version is equal or higher to $version

Parameters

string $version version to compare to

Return Value

boolean true if theme version is equal or higher to $version

at line 282
void setName(string $name)

sets name

Parameters

string $name name to set

Return Value

void

at line 293
string getName()

returns name

Return Value

string name

at line 306
void setId(string $id)

sets id

Parameters

string $id new id

Return Value

void

at line 317
string getId()

returns id

Return Value

string id

at line 330
void setImgPath(string $path)

Sets path to images for the theme

Parameters

string $path path to images for this theme

Return Value

void

at line 346
string getImgPath(string $file = null, string $fallback = null)

Returns the path to image for the theme.

If filename is given, it possibly fallbacks to fallback theme for it if image does not exist.

Parameters

string $file file name for image
string $fallback fallback image

Return Value

string image path for this theme

at line 369
string getPrintPreview()

Renders the preview for this theme

Return Value

string