protected function createRoutes($input)
    {
        if ($input instanceof \Traversable) {
            $input = iterator_to_array($input, true);
        } elseif ($input instanceof \stdClass) {
            $input = get_object_vars($input);
        }

        return array_map([$this, 'createRoute'], $input);
    }