@@ 579-595 (lines=17) @@ | ||
576 | * @return ActionDescriptor|null |
|
577 | * @throws \OldTown\Workflow\Exception\ArgumentNotNumericException |
|
578 | */ |
|
579 | public function getInitialAction($id) |
|
580 | { |
|
581 | if (!is_numeric($id)) { |
|
582 | $errMsg = 'Аргумент должен быть числом'; |
|
583 | throw new ArgumentNotNumericException($errMsg); |
|
584 | } |
|
585 | $id = (integer)$id; |
|
586 | ||
587 | $initialActions = $this->getInitialActions(); |
|
588 | foreach ($initialActions as $actionDescriptor) { |
|
589 | if ($id === $actionDescriptor->getId()) { |
|
590 | return $actionDescriptor; |
|
591 | } |
|
592 | } |
|
593 | ||
594 | return null; |
|
595 | } |
|
596 | ||
597 | /** |
|
598 | * @return JoinDescriptor[]|SplObjectStorage |
|
@@ 612-628 (lines=17) @@ | ||
609 | * @return JoinDescriptor|null |
|
610 | * @throws \OldTown\Workflow\Exception\ArgumentNotNumericException |
|
611 | */ |
|
612 | public function getJoin($id) |
|
613 | { |
|
614 | if (!is_numeric($id)) { |
|
615 | $errMsg = 'Аргумент должен быть числом'; |
|
616 | throw new ArgumentNotNumericException($errMsg); |
|
617 | } |
|
618 | $id = (integer)$id; |
|
619 | ||
620 | $joins = $this->getJoins(); |
|
621 | foreach ($joins as $joinDescriptor) { |
|
622 | if ($id === $joinDescriptor->getId()) { |
|
623 | return $joinDescriptor; |
|
624 | } |
|
625 | } |
|
626 | ||
627 | return null; |
|
628 | } |
|
629 | ||
630 | /** |
|
631 | * @return array |
|
@@ 662-678 (lines=17) @@ | ||
659 | * @return SplitDescriptor|null |
|
660 | * @throws \OldTown\Workflow\Exception\ArgumentNotNumericException |
|
661 | */ |
|
662 | public function getSplit($id) |
|
663 | { |
|
664 | if (!is_numeric($id)) { |
|
665 | $errMsg = 'Аргумент должен быть числом'; |
|
666 | throw new ArgumentNotNumericException($errMsg); |
|
667 | } |
|
668 | $id = (integer)$id; |
|
669 | ||
670 | $splits = $this->getSplits(); |
|
671 | foreach ($splits as $splitDescriptor) { |
|
672 | if ($id === $splitDescriptor->getId()) { |
|
673 | return $splitDescriptor; |
|
674 | } |
|
675 | } |
|
676 | ||
677 | return null; |
|
678 | } |
|
679 | ||
680 | /** |
|
681 | * @param integer $id |