PHP code example of mauro-moreno / datafactory-client

1. Go to this page and download the library: Download mauro-moreno/datafactory-client 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/ */

    

mauro-moreno / datafactory-client example snippets




// Instantiate client
$client = new \MauroMoreno\DataFactory\Client();

// Call get channels resource
$content = $client->getChannels();

// Instantiate serializer with configurations.
$serializer = \JMS\Serializer\SerializerBuilder::create()
   ->addMetadataDir(__DIR__ . '/resources/config/serializer')
   ->build();

// Instantiate document
$document = new \MauroMoreno\DataFactory\Document($serializer);

// Parse resource contents
$document->parseChannels($content);