public function apply($objects, TransitionEvent $event, $transition = null, $graph = null, $soft = true)
    {
        if (!is_array($objects) && !$objects instanceof \Traversable) {
            $objects = array($objects);
        }

        if (null === $transition) {
            $transition = $event->getTransition();
        }

        if (null === $graph) {
            $graph = $event->getStateMachine()->getGraph();
        }

        foreach ($objects as $object) {
            $this->factory->get($object, $graph)->apply($transition, $soft);
        }
    }