PHP code example of apie / storage-metadata-builder

1. Go to this page and download the library: Download apie/storage-metadata-builder 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/ */

    

apie / storage-metadata-builder example snippets


use Apie\StorageMetadataBuilder\ChainedBootGeneratedCode;
use Apie\StorageMetadataBuilder\ChainedGeneratedCodeContext;
use Apie\StorageMetadataBuilder\ChainedPostGeneratedCodeContext;
use Apie\StorageMetadataBuilder\StorageMetadataBuilder;

$instance = new StorageMetadataBuilder(
    $boundedContextHashmap,
    new ChainedBootGeneratedCode(/* list of class instances that implement BootGeneratedCodeInterface */),
    new ChainedGeneratedCodeContext(/* list of class instances that implement RunGeneratedCodeContextInterface */),
    new ChainedPostGeneratedCodeContext(/* list of class instances that implement PostRunGeneratedCodeContextInterface */)
);
$code = $instance->generateCode();
// this property contains an array with filename => generated php files
$code->generatedCodeHashmap