Example #1
0
 public function toArray()
 {
     $process_state_as_array = parent::toArray();
     $process_state_as_array['state_name'] = $this->getStateName();
     $process_state_as_array['payload'] = $this->getPayload();
     return $process_state_as_array;
 }
Example #2
0
 public function __construct(array $state = [])
 {
     $this->type_definition = new EntityTypeDefinition();
     $this->embed_definitions = new EntityTypeDefinitionList();
     $this->reference_definitions = new EntityTypeDefinitionList();
     parent::__construct($state);
 }
Example #3
0
 public function __construct(array $state = [])
 {
     $this->metadata = [];
     $this->iso_date = DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', microtime(true)))->format(self::DATE_ISO8601_WITH_MICROS);
     parent::__construct($state);
     $this->guardRequiredState();
 }
Example #4
0
 /**
  * Override the Object's constructor to always initialize options.
  * To set options on this instance use the special key 'options'.
  *
  * @param array $state data to set on the object (key-value pairs)
  */
 public function __construct(array $state = [])
 {
     parent::__construct($state);
     if (!$this->options instanceof OptionsInterface) {
         $this->options = new Options();
     }
 }
Example #5
0
 public function __construct(array $state = [])
 {
     $this->metadata = [];
     $this->uuid = Uuid::uuid4()->toString();
     parent::__construct($state);
     $this->guardRequiredState();
 }
Example #6
0
 public function __construct(array $state = [])
 {
     $this->metadata = [];
     parent::__construct($state);
     if (!$this->uuid) {
         $this->uuid = Uuid::uuid4()->toString();
     }
 }
Example #7
0
 public function __construct(array $state = [])
 {
     $this->activities = new Settings([]);
     $this->settings = new Settings([]);
     $this->slots = new Settings([]);
     $this->output_formats = new Settings([]);
     parent::__construct($state);
 }
Example #8
0
 public function __construct(array $state = [])
 {
     parent::__construct($state);
     $this->class_builder_factory = new Factory($this->config);
     $this->output_handler = function ($message) {
         echo $message . PHP_EOL;
     };
 }
Example #9
0
 public function __construct(AggregateRootTypeMap $aggregate_root_type_map, CommandBusInterface $command_bus, FilesystemServiceInterface $filesystem_service, Finder $finder, LoggerInterface $logger, array $state = [])
 {
     parent::__construct($state);
     $this->command_bus = $command_bus;
     $this->aggregate_root_type_map = $aggregate_root_type_map;
     $this->filesystem_service = $filesystem_service;
     $this->finder = $finder;
     $this->logger = $logger;
 }
Example #10
0
 protected function guardRequiredState()
 {
     parent::guardRequiredState();
     Assertion::string($this->parent_attribute_name);
     Assertion::string($this->embedded_entity_type);
     Assertion::uuid($this->embedded_entity_identifier);
     Assertion::isArray($this->embedded_entity_events);
     Assertion::isArray($this->data);
 }
Example #11
0
 public function __construct(array $state = [])
 {
     parent::__construct($state);
     if (empty($this->attributes)) {
         $this->attributes = new AttributeDefinitionList();
     }
     if (empty($this->options)) {
         $this->options = new OptionDefinitionList();
     }
 }
Example #12
0
 public function __construct(array $state = [])
 {
     $this->filter = [];
     $this->limit = 50;
     $this->offset = 0;
     $this->search = '';
     $this->settings = new Settings([]);
     $this->sort = '';
     parent::__construct($state);
 }
Example #13
0
 /**
  * Constructs a new ValueChangedEvent instance.
  */
 public function __construct(array $state = [])
 {
     $this->timestamp = time();
     parent::__construct($state);
 }
Example #14
0
 public function __construct(array $state = [])
 {
     parent::__construct($state);
     $this->twig = new Twig_Environment(new Twig_Loader_Filesystem($this->getTemplateBaseDirectories()));
 }
Example #15
0
 public function __construct(array $state = [])
 {
     $this->created_date = date(DATE_ISO8601);
     parent::__construct($state);
 }
Example #16
0
 public function __construct(array $state = array())
 {
     $this->events = new AggregateRootEventList();
     parent::__construct($state);
 }
Example #17
0
 public function __construct(array $state = [])
 {
     $this->file_system = new Filesystem();
     parent::__construct($state);
 }