AbstractThemeUtility
in package
Abstract base class to hold shared logic for theme utilities.
Tags
Table of Contents
- $info : ThemeInfo
- Theme info object
- $lastError : string
- Last error message
- __construct() : mixed
- Constructor
- getLastError() : string
- Get last error message.
- copyDir() : bool
- Copy the contents of $src into $dest if no matching files already exist.
- deleteDir() : bool
- Recursively delete a directory and its contents.
- setLastError() : bool
- Set last error message and return a boolean false.
Properties
$info
Theme info object
protected
ThemeInfo
$info
$lastError
Last error message
protected
string
$lastError
= null
Methods
__construct()
Constructor
public
__construct(ThemeInfo $info) : mixed
Parameters
- $info : ThemeInfo
-
Theme info object
Return values
mixed —getLastError()
Get last error message.
public
getLastError() : string
Return values
string —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 —setLastError()
Set last error message and return a boolean false.
protected
setLastError(string $error) : bool
Parameters
- $error : string
-
Error message.