PHP code example of kigkonsult / phpincexsdk

1. Go to this page and download the library: Download kigkonsult/phpincexsdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kigkonsult / phpincexsdk example snippets




use Kigkonsult\PhpIncExSdk\PhpIncExSdk;

// get a rfc8727 json string
$jsonString = ....

$dto = PhpIncExSdk::factoryJsonParse( $jsonString )
    ->getDto();




use Kigkonsult\PhpIncExSdk\PhpIncExSdk;

// create a IODEFdocument class instance 
$dto = ....

$jsonString = PhpIncExSdk::factoryJsonWrite( $dto )
    ->getJsonString();




use Kigkonsult\PhpIncExSdk\PhpIncExSdk;

// get a rfc8727 json string
$jsonString = ....

// parse the rfc8727 json string
$phpIncExSdk = PhpIncExSdk::factory()
    ->jsonParse( jsonString );

if( ! $phpIncExSdk->validateDto( null, $result = [] )) {
    var_export( $result, true );
    ...
}