[Workflow] feature: add getter in workflow
This commit is contained in:
parent
531b294b21
commit
9910ba1ad4
@ -54,4 +54,12 @@ class MultipleStateMarkingStore implements MarkingStoreInterface
|
|||||||
{
|
{
|
||||||
$this->propertyAccessor->setValue($subject, $this->property, $marking->getPlaces());
|
$this->propertyAccessor->setValue($subject, $this->property, $marking->getPlaces());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getProperty()
|
||||||
|
{
|
||||||
|
return $this->property;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,4 +59,12 @@ class SingleStateMarkingStore implements MarkingStoreInterface
|
|||||||
{
|
{
|
||||||
$this->propertyAccessor->setValue($subject, $this->property, key($marking->getPlaces()));
|
$this->propertyAccessor->setValue($subject, $this->property, key($marking->getPlaces()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getProperty()
|
||||||
|
{
|
||||||
|
return $this->property;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,4 +26,12 @@ final class ClassInstanceSupportStrategy implements SupportStrategyInterface
|
|||||||
{
|
{
|
||||||
return $subject instanceof $this->className;
|
return $subject instanceof $this->className;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getClassName()
|
||||||
|
{
|
||||||
|
return $this->className;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,6 +186,14 @@ class Workflow
|
|||||||
return $this->definition;
|
return $this->definition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return MarkingStoreInterface
|
||||||
|
*/
|
||||||
|
public function getMarkingStore()
|
||||||
|
{
|
||||||
|
return $this->markingStore;
|
||||||
|
}
|
||||||
|
|
||||||
private function doCan($subject, Marking $marking, Transition $transition)
|
private function doCan($subject, Marking $marking, Transition $transition)
|
||||||
{
|
{
|
||||||
foreach ($transition->getFroms() as $place) {
|
foreach ($transition->getFroms() as $place) {
|
||||||
|
Reference in New Issue
Block a user