PHP code example of voltel / extra-foundry-bundle

1. Go to this page and download the library: Download voltel/extra-foundry-bundle 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/ */

    

voltel / extra-foundry-bundle example snippets


    $order_entity = $this->persistService->createOne($factory_order, 
        ['customer' => $customer_entity], 
        ['sent']
    );

    $order_item_batch = $this->persistService->createMany($factory_order_item, rand(1, 4), function() {
        return [
            'unitCount' => rand(1, 20)
        ];
    });

        $a_setup_customers = [
            'customer_1' =>['states' => ['american', 'human']],
            'customer_2' =>['states' => ['ukrainian', 'human'],
            'customer_3' =>['states' => ['human'], 'attributes' => ['firstName' => 'John', 'lastName' => 'Doe']],
            'customer_4' =>['states' => ['human'], 'attributes' => ['firstName' => 'Богдан', 'lastName' => 'Мірошник']],
        ];

        $this->setUpFixtureEntityService-> createEntities($factory_customer, $a_setup_customers, true);

    class GlobalStory extends Story
    {
        //...

        public function build(): void
        {
            $this->sqlDumpLoaderService->loadSqlDump();
        }
    }