Pionia Core

Pionia
in package

This is the base class for the framework

It holds the settings and the version of the framework

All classes in the framework should extend this class to have access to the core configurations

Tags
since
1.1.1
  • Added the ability to change the name of the framework from the core :)
author

Jet - ezrajet9@gmail.com

Table of Contents

Properties

$name  : string
$settings  : array<string|int, mixed>|null
$version  : string

Methods

__construct()  : mixed
boot()  : Pionia
getServerSettings()  : array<string|int, mixed>
Returns the server settings under [server] in the settings file
getSetting()  : mixed
Checks for the setting and returns it If the setting is not found, it returns null
getSettingOrDefault()  : mixed
Returns the setting or the default value if the setting is not found
getSettings()  : array<string|int, mixed>|null
Returns all the settings in the settings file
getUploadSettings()  : array<string|int, mixed>
Returns the upload settings under [uploads] in the settings file
resolveSettingsFromIni()  : array<string|int, mixed>|bool|null
Resolved the settings from all the possible sources

Properties

$name

public static string $name = 'Pionia'

$settings

public static array<string|int, mixed>|null $settings = null

$version

public static string $version = '1.1.7'

Methods

__construct()

public __construct() : mixed

getServerSettings()

Returns the server settings under [server] in the settings file

public static getServerSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSetting()

Checks for the setting and returns it If the setting is not found, it returns null

public static getSetting(string $key) : mixed

Here SERVER and server are the same

Parameters
$key : string

getSettingOrDefault()

Returns the setting or the default value if the setting is not found

public static getSettingOrDefault(string $key, mixed $default) : mixed
Parameters
$key : string
$default : mixed

getSettings()

Returns all the settings in the settings file

public static getSettings() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getUploadSettings()

Returns the upload settings under [uploads] in the settings file

public static getUploadSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>

resolveSettingsFromIni()

Resolved the settings from all the possible sources

public static resolveSettingsFromIni() : array<string|int, mixed>|bool|null

Possible sources are:

  • The settings file -- database.ini
  • The session -- if the session is active and the session settings are set
  • The server settings -- Anything in $_SERVER
  • The environment settings -- Anything in $_ENV
Return values
array<string|int, mixed>|bool|null

        
On this page

Search results