[Workflow] feature: add getter in workflow

This commit is contained in:
Amrouche Hamza 2017-07-28 11:47:13 +02:00
parent 531b294b21
commit 9910ba1ad4
No known key found for this signature in database
GPG Key ID: 6968F2785ED4F012
4 changed files with 32 additions and 0 deletions

View File

@ -54,4 +54,12 @@ class MultipleStateMarkingStore implements MarkingStoreInterface
{
$this->propertyAccessor->setValue($subject, $this->property, $marking->getPlaces());
}
/**
* @return string
*/
public function getProperty()
{
return $this->property;
}
}

View File

@ -59,4 +59,12 @@ class SingleStateMarkingStore implements MarkingStoreInterface
{
$this->propertyAccessor->setValue($subject, $this->property, key($marking->getPlaces()));
}
/**
* @return string
*/
public function getProperty()
{
return $this->property;
}
}

View File

@ -26,4 +26,12 @@ final class ClassInstanceSupportStrategy implements SupportStrategyInterface
{
return $subject instanceof $this->className;
}
/**
* @return string
*/
public function getClassName()
{
return $this->className;
}
}

View File

@ -186,6 +186,14 @@ class Workflow
return $this->definition;
}
/**
* @return MarkingStoreInterface
*/
public function getMarkingStore()
{
return $this->markingStore;
}
private function doCan($subject, Marking $marking, Transition $transition)
{
foreach ($transition->getFroms() as $place) {