public function register($alias, $class)
	{
		$alias = strtolower($alias);

		if (array_key_exists($alias, $this->instances))
		{
			throw new \RuntimeException('You cannot register a provider when an instance of that class has already been created.');
		}

		$this->services[$alias] = $class;

		return $this;
	}
public function register($alias, $class)
	{
		$alias = strtolower($alias);

		if (array_key_exists($alias, $this->instances))
		{
			throw new \RuntimeException('You cannot register a provider when an instance of that class has already been created.');
		}

		$this->services[$alias] = $class;

		return $this;
	}
public function register ( $ alias , $ class ) { $ alias = strtolower ( $ alias ) ; if ( array_key_exists ( $ alias , $ this -> instances ) ) { throw new \ RuntimeException ( 'You cannot register a provider when an instance of that class has already been created.' ) ; } $ this -> services [ $ alias ] = $ class ; return $ this ; }
Registers a specific class name with the corresponding alias
for the dependency inversion.

@param $name
@param $class

@return $this
Registers a specific class name with the corresponding alias for the dependency inversion .