public function register($name, $handler)
    {
        if (is_callable($handler)) {
            $params = array_merge(array($this), $this->params);
            $this->container[$name] = call_user_func_array($handler, $params);

        } else {
            $this->container[$name] = $handler;
        }

        return $this;
    }
public function register($name, $handler)
    {
        if (is_callable($handler)) {
            $params = array_merge(array($this), $this->params);
            $this->container[$name] = call_user_func_array($handler, $params);

        } else {
            $this->container[$name] = $handler;
        }

        return $this;
    }
public function register ( $ name , $ handler ) { if ( is_callable ( $ handler ) ) { $ params = array_merge ( array ( $ this ) , $ this -> params ) ; $ this -> container [ $ name ] = call_user_func_array ( $ handler , $ params ) ; } else { $ this -> container [ $ name ] = $ handler ; } return $ this ; }
Registers a service

@param string $name
@param mixed $handler Either a closure or an instance
@return \Krystal\InstanceManager\DependencyInjectionContainer
Registers a service