\core\commonEntity

This class represents an Entity in its widest sense. Every entity can log and query/change the language settings where needed.

Summary

Methods
Properties
Constants
__construct()
__destruct()
createTemporaryDirectory()
rrmdir()
No public properties found
L_OK
L_REMARK
L_WARN
L_ERROR
No protected methods found
$loggerInstance
$languageInstance
N/A
No private methods found
No private properties found
N/A

Constants

L_OK

L_OK = 0

L_REMARK

L_REMARK = 4

L_WARN

L_WARN = 32

L_ERROR

L_ERROR = 256

Properties

$loggerInstance

$loggerInstance : \core\common\Logging

We occasionally log stuff (debug/audit). Have an initialised Logging instance nearby is sure helpful.

Type

\core\common\Logging —

$languageInstance

$languageInstance : \core\common\Language

access to language settings to be able to switch textDomain

Type

\core\common\Language —

Methods

__construct()

__construct() 

initialise the entity.

Logs the start of lifetime of the entity to the debug log on levels 3 and higher.

__destruct()

__destruct() 

destroys the entity.

Logs the end of lifetime of the entity to the debug log on level 5.

createTemporaryDirectory()

createTemporaryDirectory(  purpose = installer,   failIsFatal = 1) : mixed|string|int

create a temporary directory and return the location

Parameters

purpose

one of 'installer', 'logo', 'test' defined the purpose of the directory

failIsFatal

decides if a creation failure should cause an error; defaults to true

Returns

mixed|string|int —

the tuple of: base path, absolute path for directory, directory name

rrmdir()

rrmdir(  dir) 

this direcory delete function has been copied from PHP documentation

Parameters

dir

name of the directory to delete