private function getObjectFactory(): callable
    {
        if ($this->objectFactory === null) {
            $className = $this->getClassName();

            $this->objectFactory = function () use ($className) {
                return new $className();
            };
        }

        return $this->objectFactory;
    }
private function getObjectFactory(): callable
    {
        if ($this->objectFactory === null) {
            $className = $this->getClassName();

            $this->objectFactory = function () use ($className) {
                return new $className();
            };
        }

        return $this->objectFactory;
    }
private function getObjectFactory ( ) : callable { if ( $ this -> objectFactory === null ) { $ className = $ this -> getClassName ( ) ; $ this -> objectFactory = function ( ) use ( $ className ) { return new $ className ( ) ; } ; } return $ this -> objectFactory ; }
Get object factory.

@return callable
Get object factory .