Class AX
Properties
Methods
$str = AX::getAXVersion()
Get the current version string of the AX installation.
var_dump(AX::getAXVersion());
//== output
//string '0.8pre 18' (length=10)
$str = AX::getConfiguration()
Get the current configuration set of the AX installation.
var_dump(AX::getConfiguration());
//== output
//object(stdClass)[31]
//public 'SYS' =>
//object(stdClass)[51]
//public 'SYSTEM_NAME' => string 'AX Demo Development' (length=19)
//public 'STATE' => string 'online' (length=6)
//public 'THEME' => string 'default' (length=7)
//...
$str = AX::getConfigurationValue($str)
Get the set value of the configuration key.
Don't forget the prefix like SYS.*.
var_dump(AX::getConfigurationValue("SYS.THEME"));
//== output
//string 'default' (length=7)
$str = AX::getSystemName()
Get the system name of the AX installation.
$bool = AX::getDevMode()
Get the property whether the Developer Mode is on or off.
var_dump(AX::getDevMode());
//== output
//boolean false
$str = AX::getPHPVersion()
Get the property whether the Developer Mode is on or off.
var_dump(AX::getPHPVersion());
//== output
//string '5.4.45' (length=6)
$str = AX::getDBName()
Get the name of the connected database used for ax.
var_dump(AX::getDBName());
//== output
//string 'ax' (length=2)
$str = AX::getDBHost()
Get the host URI for the connected database.
var_dump(AX::getDBHost());
//== output
//string '127.0.0.1' (length=9)
$str = AX::getDBVersion()
Get the current database version for the connected database.
In most cases this will correspond to the used mySQL version of the database host.
var_dump(AX::getDBVersion());
//== output
//string '5.6.35' (length=6)
$str = AX::getAXRootPath()
Get the server absolute path to your ax folder.
var_dump(AX::getAXRootPath());
//== output
//string '/Users/tomnjerry/Documents/workspace/ax' (length=39)
In this case our htdocs folder corresponds to
'/Users/tomnjerry/Documents/workspace'
this could also look like
'C:/apache2/htdocs'
or
'/var/www/htdocs'
etc. depending on your system.
$str = AX::getAXRelPath()
Get the relative path from htdocs to your ax folder.
var_dump(AX::getAXRelPath());
//== output
//string 'ax/' (length=3)
$str = AX::getAXTempPath()
Get the temp path set in config.inc.php
.
var_dump(AX::getAXTempPath());
//== output
//string 'C:\Windows\Temp' (length=15)
$str = AX::getAXDataPath()
Get the data path set in config.inc.php
.
var_dump(AX::getAXDataPath());
//== output
//string 'C:/Users/Username/workspace/ax/_data' (length=36)
$str = AX::renderAllJSGlobals()
Render some globals as JavaScript to client, as used in index.php.
AX::renderAllJSGlobals();
//== output
//GLOBALS = {};
//GLOBALS.AX_DEVMODE = true;
//GLOBALS.AX_VERSION = "0.8 pre 0001";
$str = AX::getRoles()
Get all available system roles.
Keep in mind, in most cases you will be just fine with
hasRole(<rolename>)
.
var_dump(AX::getRoles());
//== output
//array (size=2)
// 0 =>
// object(stdClass)[32]
// public 'id' => int 1
// public 'Name' => string 'admin' (length=5)
// public 'Info' => null
// 1 =>
// object(stdClass)[33]
// public 'id' => int 2
// public 'Name' => string 'user' (length=4)
// public 'Info' => null
$str = AX::getRunstate()
Get the current runstate of the system.
Possible values: offline
, online
, going down
.
var_dump(AX::getRunstate());
//== output
//string 'online' (length=6)
$str = AX::getUsersOnline()
Get an array of all users online.
var_dump(AX::getUsersOnline());
//== output
//array (size=1)
// 0 =>
// object(stdClass)[49]
// public 'id' => int 1
// public 'Username' => string 'admin' (length=5)
// public 'Email' => string 'admin@company.com' (length=17)
// public 'isActive' => int 1
// public 'lastLogin' => string '2018-06-17 22:25:45' (length=19)
// public 'lastET' => string '2018-06-18 14:30:03' (length=19)