Metabor\Statemachine\StateCollection::getState PHP Метод

getState() публичный Метод

public getState ( $name )
    public function getState($name)
    {
        return $this->states->get($name);
    }

Usage Example

 /**
  *
  */
 public function testFiltersStatesThatHaveNoOutgoingTransitions()
 {
     $eventName = 'event';
     $stateCollection = new StateCollection();
     $helper = new SetupHelper($stateCollection);
     $helper->findOrCreateTransition('foo', 'bar', $eventName);
     $filter = new FilterStateByFinalState($stateCollection->getStates());
     $filteredStates = iterator_to_array($filter);
     $this->assertContains($stateCollection->getState('bar'), $filteredStates);
     $this->assertNotContains($stateCollection->getState('foo'), $filteredStates);
 }
All Usage Examples Of Metabor\Statemachine\StateCollection::getState