PHP code example of romaindesajardim / broadway-generator-bundle

1. Go to this page and download the library: Download romaindesajardim/broadway-generator-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/ */

    

romaindesajardim / broadway-generator-bundle example snippets

 bin/console rdsj:broadway:generate-command
 bin/console rdsj:broadway:generate-command --no-interaction FooBarBundle FooBar [foo.bar-handler]
 bin/console rdsj:broadway:generate-event
 bin/console rdsj:broadway:generate-command --no-interaction FooBarBundle FooBar [foo.bar-projector]
 bin/console rdsj:broadway:generate-readmodel
 bin/console rdsj:broadway:generate-readmodel --no-interaction FooBarBundle FooBar [services.xml]
 bin/console rdsj:broadway:generate-readmodel --no interaction FooBarBundle FooBar services.xml



namespace FooBarBundle\Command;


class FooBarCommand
{
    private $uuid;

    public function __construct($uuid)
    {
        $this->uuid = $uuid;
    }

    public function getUUID()
    {
        return $this->uuid;
    }
}

    
    
    namespace FooBarBundle\ReadModel;
    
    use Broadway\ReadModel\Identifiable;
    
    class FooBarReadModel implements Identifiable
    {
        private $id;
    
        public function __construct($id)
        {
            $this->id = $id;
        }
    
        public function getId()
        {
            return $this->id;
        }
    }