VuFind API Documentation

ThemeCompiler extends AbstractThemeUtility
in package

Class to compile a theme hierarchy into a single flat theme.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Site

Table of Contents

$info  : ThemeInfo
Theme info object
$lastError  : string
Last error message
__construct()  : mixed
Constructor
compile()  : bool
Compile from $source theme into $target theme.
getLastError()  : string
Get last error message.
removeTheme()  : bool
Remove a theme directory (used for cleanup in testing).
copyDir()  : bool
Copy the contents of $src into $dest if no matching files already exist.
deleteDir()  : bool
Recursively delete a directory and its contents.
mergeConfig()  : array<string|int, mixed>
Merge configurations from $src into $dest; return the result.
setLastError()  : bool
Set last error message and return a boolean false.

Properties

Methods

compile()

Compile from $source theme into $target theme.

public compile(string $source, string $target[, bool $forceOverwrite = false ]) : bool
Parameters
$source : string

Name of source theme

$target : string

Name of target theme

$forceOverwrite : bool = false

Should we overwrite the target if it exists?

Return values
bool

getLastError()

Get last error message.

public getLastError() : string
Return values
string

removeTheme()

Remove a theme directory (used for cleanup in testing).

public removeTheme(string $theme) : bool
Parameters
$theme : string

Name of theme to remove.

Return values
bool

copyDir()

Copy the contents of $src into $dest if no matching files already exist.

protected copyDir(string $src, string $dest) : bool
Parameters
$src : string

Source directory

$dest : string

Target directory

Return values
bool

deleteDir()

Recursively delete a directory and its contents.

protected deleteDir(string $path) : bool
Parameters
$path : string

Directory to delete.

Return values
bool

mergeConfig()

Merge configurations from $src into $dest; return the result.

protected mergeConfig(array<string|int, mixed> $src, array<string|int, mixed> $dest) : array<string|int, mixed>
Parameters
$src : array<string|int, mixed>

Source configuration

$dest : array<string|int, mixed>

Destination configuration

Return values
array<string|int, mixed>

setLastError()

Set last error message and return a boolean false.

protected setLastError(string $error) : bool
Parameters
$error : string

Error message.

Return values
bool

Search results