Class Phramework
API 'framework' for RESTful services
Defined settings:
- boolean debug, [Optional], default false
- string errorlog_path [Optional], default is null
- string language [Optional], default is "en"
- string[] languages [Optional], default is []
- string[] allowed_referer [Optional], default is null
Namespace: Phramework
License: Apache-2.0
Author: Xenofon Spafaridis nohponex@gmail.com
Version: 1.2.0
Link: Developer's website
Todo: Clean GET callback
Todo: Add translation class
Todo: Add allowed origin settings and implementation
Todo: Add setting for timezone
Located at Phramework.php
License: Apache-2.0
Author: Xenofon Spafaridis nohponex@gmail.com
Version: 1.2.0
Link: Developer's website
Todo: Clean GET callback
Todo: Add translation class
Todo: Add allowed origin settings and implementation
Todo: Add setting for timezone
Located at Phramework.php
Methods summary
public
|
#
__construct( array $settings,
Initialize API |
public static
|
|
public static
string
|
|
public static
|
|
public static
type
|
#
getTranslated( string $key, object|array|null $parameters = null, string $fallbackValue = null )
Shortcut function alias of $this->translation->getTranslated |
public
|
|
public static
stdClass|false
|
|
public static
integer
|
|
public static
string
|
|
public static
string
|
|
public static
string
|
|
public static
string
|
|
public static
string
|
|
public static
Mixed
|
#
getSetting( string $key, string|null $secondLevel = null, mixed $defaultValue = null )
Get a setting value |
public static
|
|
public static
mixed
|
|
public static
|
Constants summary
|
METHOD_ANY
|
#
null
|
string |
METHOD_GET
|
#
'GET'
|
string |
METHOD_POST
|
#
'POST'
|
string |
METHOD_PUT
|
#
'PUT'
|
string |
METHOD_DELETE
|
#
'DELETE'
|
string |
METHOD_HEAD
|
#
'HEAD'
|
string |
METHOD_PATCH
|
#
'PATCH'
|
string |
METHOD_OPTIONS
|
#
'OPTIONS'
|
string |
METHOD_TRACE
|
#
'TRACE'
|
Properties summary
protected static
|
$instance
|
|
protected static
string
|
$requestUUID
UUID generated for this request |
|
public static
|
$stepCallback
StepCallback extension |
|
public static
Phramework\Extensions\translation
|
$translation
translation extension |
|
public static
string[]
|
$methodWhitelist
Allowed HTTP methods |
#
[
self::METHOD_GET,
self::METHOD_POST,
self::METHOD_DELETE,
self::METHOD_PUT,
self::METHOD_HEAD,
self::METHOD_OPTIONS,
self::METHOD_PATCH
]
|