Download the PHP package kigkonsult/phpincexsdk without Composer
On this page you can find all versions of the php package kigkonsult/phpincexsdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kigkonsult/phpincexsdk
More information about kigkonsult/phpincexsdk
Files in kigkonsult/phpincexsdk
Package phpincexsdk
Short Description PhpIncExSdk is the PHP SDK implementation of rfc8727, JSON Binding of the Incident Object Description Exchange Format (rfc7970)
License LGPL-3.0-or-later
Informations about the package phpincexsdk
PhpIncExSdk
is the PHP SDK implementation of
- rfc8727, JSON Binding of the Incident Object Description Exchange Format (rfc7970)
- supports json parse/write and the IODEFdocument class instance rfc8727 validation.
Usage
For package class and property structure, examine rfc8727 3.1. Classes and Elements.
All classes has a (no-arg) factory method, some also with factory method and mandatory properties,
ex IncidentID::factoryNameId( name, id ).
All properties has get<Prop>,set<Prop> and is<Prop>Set methods,
for array properties also add<Prop> method.
To support the usage of unique id's (IncidentID::id, IndicatorID::id, *::observable-id, *::uid-ref etc),
the (static) method <class>::createGUID() is available, return a v4 guid.
the (entry) PhpIncExSdk class methods :
Properties, equipped with get and set methods
dtoIODEFdocument instancejsonStringstring
factory( [ jsonString [, dto ]] )
- Class factory method
jsonStringstringdtoIODEFdocument class instance- return static
- static
factoryJsonParse( jsonString )
- Class factory method, parse jsonString into (internal dto) IODEFdocument instance
- (with json default flags JSON_OBJECT_AS_ARRAY | JSON_THROW_ON_ERROR)
jsonStringstring- return static
- throws RuntimeException
- static
factoryJsonWrite( dto [ prettyPrint] )
- Class factory method, write IODEFdocument instance into (internal) jsonString
dtoIODEFdocument class instanceprettyPrintbool default false- return static
- throws RuntimeException
- static
function jsonParse( [ jsonString [, flags] )
- Parse jsonString into (internal dto) IODEFdocument class instance
jsonStringstringflagsint default JSON_OBJECT_AS_ARRAY | JSON_THROW_ON_ERROR- return static
- throws RuntimeException
jsonWrite( [ dto [, prettyPrint [, flags ]]] )
- Write IODEFdocument instance into (internal) jsonString
dtoIODEFdocument class instanceprettyPrintbool default falseflagsint default JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR- return static
- throws RuntimeException
validateDto( [ dto [, result ]] )
- Validate IODEFdocument class instance
dtoIODEFdocument class instanceresultarray contain opt missing required parts on false return- return bool true on success
- throws RuntimeException
Example
Parse rfc8727 json string into a IODEFdocument class instance
Write the rfc8727 IODEFdocument class instance to json string
Validate the rfc8727 IODEFdocument class instance
Support
For support use github.com/PhpIncExSdk. Non-emergence support issues are, unless sponsored, fixed in due time.
Sponsorship
Donation using paypal.me/kigkonsult are appreciated. For invoice, please e-mail.
Installation
Composer
From the Command Line:
In your composer.json:
License
PhpIncExSdk is licensed under the LGPLv3 License.