private function getViaFactory(string $className, string $typeName, AbstractTypeFactory $factory): Type
    {
        $this->throwIfNotEntity($className);

        if (!isset($this->types[$typeName])) {
            $instance = $factory->create($className, $typeName);
            $this->registerInstance($instance);
        }

        return $this->types[$typeName];
    }
private function getViaFactory(string $className, string $typeName, AbstractTypeFactory $factory): Type
    {
        $this->throwIfNotEntity($className);

        if (!isset($this->types[$typeName])) {
            $instance = $factory->create($className, $typeName);
            $this->registerInstance($instance);
        }

        return $this->types[$typeName];
    }
private function getViaFactory ( string $ className , string $ typeName , AbstractTypeFactory $ factory ) : Type { $ this -> throwIfNotEntity ( $ className ) ; if ( ! isset ( $ this -> types [ $ typeName ] ) ) { $ instance = $ factory -> create ( $ className , $ typeName ) ; $ this -> registerInstance ( $ instance ) ; } return $ this -> types [ $ typeName ] ; }
Get a type from internal registry, and create it via the factory if needed

@param string $className
@param string $typeName
@param AbstractTypeFactory $factory

@return Type
Get a type from internal registry and create it via the factory if needed