MagratheaPHP
extends Singleton
in package
Base class for Magrathea project
Table of Contents
Properties
- $appRoot : mixed
- $codeFolder : mixed
- $magRoot : mixed
- $instance : array<string|int, mixed>|null
Methods
- __wakeup() : mixed
- AddCodeFolder() : MagratheaPHP
- Adds a code folder for autoload
- AddFeature() : MagratheaPHP
- Adds features (and its folders)
- AppPath() : MagratheaPHP
- Sets App Root Path
- Connect() : MagratheaPHP
- Connect to Database
- Debug() : MagratheaPHP
- Set debug development
- Dev() : MagratheaPHP
- Set dev display errors
- getConfigRoot() : string
- Get Config Root
- GetDB() : Database
- Gets Database object
- GetMagratheaRoot() : string
- Instance() : static|Singleton
- Load() : MagratheaPHP
- Starts Magrathea
- LoadVendor() : void
- MockClass() : static|Singleton
- Prod() : MagratheaPHP
- Set prod environment
- SetInstance() : mixed
- StartDB() : MagratheaPHP
- Connect to Database (other name for Connect)
- StartSession() : MagratheaPHP
- starts session if needed
- Test() : void
- Test Magrathea
- Version() : string
- Gets Magrathea Version
- __clone() : mixed
- __construct() : mixed
Properties
$appRoot
public
mixed
$appRoot
= ""
$codeFolder
public
mixed
$codeFolder
= []
$magRoot
public
mixed
$magRoot
= ""
$instance
protected
static array<string|int, mixed>|null
$instance
= []
Methods
__wakeup()
public
final __wakeup() : mixed
AddCodeFolder()
Adds a code folder for autoload
public
AddCodeFolder(string ...$folder) : MagratheaPHP
Parameters
- $folder : string
-
foldername
Return values
MagratheaPHP —itself
AddFeature()
Adds features (and its folders)
public
AddFeature(string ...$features) : MagratheaPHP
Parameters
- $features : string
-
features names
Return values
MagratheaPHP —itself
AppPath()
Sets App Root Path
public
AppPath(string $path) : MagratheaPHP
Parameters
- $path : string
-
Root path of project
Return values
MagratheaPHPConnect()
Connect to Database
public
Connect() : MagratheaPHP
Return values
MagratheaPHPDebug()
Set debug development
public
Debug() : MagratheaPHP
Return values
MagratheaPHPDev()
Set dev display errors
public
Dev() : MagratheaPHP
Return values
MagratheaPHPgetConfigRoot()
Get Config Root
public
getConfigRoot() : string
Return values
string —config root
GetDB()
Gets Database object
public
GetDB() : Database
Return values
DatabaseGetMagratheaRoot()
public
GetMagratheaRoot() : string
Return values
string —$magratheaRoot
Instance()
public
static Instance() : static|Singleton
Return values
static|SingletonLoad()
Starts Magrathea
public
Load() : MagratheaPHP
Return values
MagratheaPHPLoadVendor()
public
static LoadVendor() : void
MockClass()
public
static MockClass(mixed $mocker) : static|Singleton
Parameters
- $mocker : mixed
Return values
static|SingletonProd()
Set prod environment
public
Prod() : MagratheaPHP
Return values
MagratheaPHPSetInstance()
public
SetInstance(mixed $inst) : mixed
Parameters
- $inst : mixed
StartDB()
Connect to Database (other name for Connect)
public
StartDB() : MagratheaPHP
Return values
MagratheaPHPStartSession()
starts session if needed
public
StartSession() : MagratheaPHP
Return values
MagratheaPHPTest()
Test Magrathea
public
static Test() : void
Version()
Gets Magrathea Version
public
static Version() : string
Return values
string —version
__clone()
protected
final __clone() : mixed
__construct()
private
final __construct() : mixed