public function createView($object)
    {
        if (is_array($object)) {
            return array_map([ $this, 'createView' ], $object);
        }

        $view = $this->factory->createView($object);

        if (false === $view instanceof View) {
            return $this->notSuitableFactoryFor($object);
        }

        if ($view instanceof RootViewFactoryAware) {
            $view->setRootViewFactory($this);
        }

        return $view;
    }