public function register($alias, \Closure $closure)
    {
        if (!is_string($alias))
            throw new Exception('Application::register() requires a string as the first parameter.');
        
        $this->registered[$alias] = $closure;
        
        return true;
    }
public function register($alias, \Closure $closure)
    {
        if (!is_string($alias))
            throw new Exception('Application::register() requires a string as the first parameter.');
        
        $this->registered[$alias] = $closure;
        
        return true;
    }
public function register ( $ alias , \ Closure $ closure ) { if ( ! is_string ( $ alias ) ) throw new Exception ( 'Application::register() requires a string as the first parameter.' ) ; $ this -> registered [ $ alias ] = $ closure ; return true ; }
Registers a alias and Closure pair in the IoC container.

@param string $alias
@param \Closure $closure
@return boolean
Registers a alias and Closure pair in the IoC container .