BaseApiController
extends Pionia
in package
AbstractYes
This is the base controller class for the framework and most probably the only controller class that should be extended.
It is used to define the base controller for the project. According to this framework, only controller classes should be used in the entire app. That's why it is called a controller anyway! Therefore, one class in the entire should extend this class. and provide the implementation as per the project requirements.
It should call the main switch's processService method to process the request and return the response.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- boot() : Pionia
- getServerSettings() : array<string|int, mixed>
- getSetting() : mixed
- Checks for the setting and returns it If the setting is not found, it returns null
- getSettingOrDefault() : mixed
- getSettings() : array<string|int, mixed>|null
- getUploadSettings() : array<string|int, mixed>
- ping() : BaseResponse
- This is just for checking the server status
- resolveSettingsFromIni() : mixed
Properties
$name
public
static string
$name
= 'Pionia'
$settings
public
static array<string|int, mixed>|null
$settings
= null
$version
public
static string
$version
= '1.1.5'
Methods
__construct()
public
__construct() : mixed
boot()
public
static boot() : Pionia
Return values
PioniagetServerSettings()
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()
public
static getSettingOrDefault(string $key, mixed $default) : mixed
Parameters
- $key : string
- $default : mixed
getSettings()
public
static getSettings() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetUploadSettings()
public
static getUploadSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>ping()
This is just for checking the server status
public
ping(Request $request) : BaseResponse
Parameters
- $request : Request
Return values
BaseResponseresolveSettingsFromIni()
public
static resolveSettingsFromIni() : mixed