private function buildAndCacheFromFactory(string $className)
    {
        $factory  = self::$cachedInstantiators[$className] = $this->buildFactory($className);
        $instance = $factory();

        if ($this->isSafeToClone(new ReflectionClass($instance))) {
            self::$cachedCloneables[$className] = clone $instance;
        }

        return $instance;
    }
private function buildAndCacheFromFactory(string $className)
    {
        $factory  = self::$cachedInstantiators[$className] = $this->buildFactory($className);
        $instance = $factory();

        if ($this->isSafeToClone(new ReflectionClass($instance))) {
            self::$cachedCloneables[$className] = clone $instance;
        }

        return $instance;
    }
private function buildAndCacheFromFactory ( string $ className ) { $ factory = self :: $ cachedInstantiators [ $ className ] = $ this -> buildFactory ( $ className ) ; $ instance = $ factory ( ) ; if ( $ this -> isSafeToClone ( new ReflectionClass ( $ instance ) ) ) { self :: $ cachedCloneables [ $ className ] = clone $ instance ; } return $ instance ; }
Builds the requested object and caches it in static properties for performance

@return object
Builds the requested object and caches it in static properties for performance