08464c9f2c
* ScalarMarkingStore -> SingleStateMarkingStore * PropertyAccessorMarkingStore -> MultipleStateMarkingStore And I also made optionnal the `marking_store` config, to let the componant choose the best marking store depending on the type (state_machine or workflow).
19 lines
632 B
PHP
19 lines
632 B
PHP
<?php
|
|
|
|
namespace Symfony\Component\Workflow;
|
|
|
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
|
use Symfony\Component\Workflow\MarkingStore\MarkingStoreInterface;
|
|
use Symfony\Component\Workflow\MarkingStore\SingleStateMarkingStore;
|
|
|
|
/**
|
|
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
|
*/
|
|
class StateMachine extends Workflow
|
|
{
|
|
public function __construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, $name = 'unnamed')
|
|
{
|
|
parent::__construct($definition, $markingStore ?: new SingleStateMarkingStore(), $dispatcher, $name);
|
|
}
|
|
}
|