public function getAllHandlersFor($input)
    {
        $this->sortHandlers();

        $filteredIterator = new \CallbackFilterIterator(
            $this->getHandlerIterator(),
            function (HandlerInterface $handler) use ($input) {
                return $handler->handles($input);
            }
        );

        $compatibleHandlers = iterator_to_array($filteredIterator, false);

        if (empty($compatibleHandlers)) {
            throw NoHandlerException::notFound();
        }

        return $compatibleHandlers;
    }