public function cloneInstance($className): self
	{
		// Determine the class to load
		$instanceName = strtolower($className);

		if (!isset($this->{$instanceName}))
		{
			throw new FactoryException("Could not clone instance of '".$instanceName."'. Instance was not found.", 1);
		}

		// Clone the instance
		$this->{$instanceName} = clone $this->{$instanceName};

		// Return itself
		return $this;
	}
public function cloneInstance($className): self
	{
		// Determine the class to load
		$instanceName = strtolower($className);

		if (!isset($this->{$instanceName}))
		{
			throw new FactoryException("Could not clone instance of '".$instanceName."'. Instance was not found.", 1);
		}

		// Clone the instance
		$this->{$instanceName} = clone $this->{$instanceName};

		// Return itself
		return $this;
	}
public function cloneInstance ( $ className ) : self { // Determine the class to load $ instanceName = strtolower ( $ className ) ; if ( ! isset ( $ this -> { $ instanceName } ) ) { throw new FactoryException ( "Could not clone instance of '" . $ instanceName . "'. Instance was not found." , 1 ) ; } // Clone the instance $ this -> { $ instanceName } = clone $ this -> { $ instanceName } ; // Return itself return $ this ; }
Clone an instance of one of the loaded classes.
It clones the class. It does NOT re-create it.

@param string $className The name of the loaded class, WITHOUT the namespace
@return Factory Instance
Clone an instance of one of the loaded classes . It clones the class . It does NOT re - create it .