public function getOrder(array $classNames): array
    {
        $elements = array_filter(iterator_to_array($this->graph), function ($element) use ($classNames): bool {
            list($node) = $element;

            return in_array($node->getClassName(), $classNames);
        });

        return array_reverse($elements, false);
    }