src/Registry.php
private static function getInstance($key, $args)
	{
		//get the name of the method
		$key = 'get' . ucfirst($key);

		//get an instance of this resource
		$instance = self::{"{$key}"}($args);

		//return this object instance
		return $instance;

	}
private static function getInstance($key, $args)
	{
		//get the name of the method
		$key = 'get' . ucfirst($key);

		//get an instance of this resource
		$instance = self::{"{$key}"}($args);

		//return this object instance
		return $instance;

	}
private static function getInstance ( $ key , $ args ) { //get the name of the method $ key = 'get' . ucfirst ( $ key ) ; //get an instance of this resource $ instance = self :: { "{$key}" } ( $ args ) ; //return this object instance return $ instance ; }
This method gets and returns the object instance of a resource

@param string $key The key to use for setting and accessing this instance from array
@param object $instance The object instance to be stored in Registry
@return viod
@throws This method does not throw an error
This method gets and returns the object instance of a resource