public function register($alias, $abstract)
    {
        if (!is_string($alias) || !is_string($abstract)) {
            throw new \InvalidArgumentException(
                sprintf("Parameter 1 and 2 of %s must be a string.", __METHOD__)
            );
        }

        if (!isset($this->aliases[$alias])) {
            $this->aliases[$alias] = $this->make($abstract);
        }

        return $this;
    }
public function register($alias, $abstract)
    {
        if (!is_string($alias) || !is_string($abstract)) {
            throw new \InvalidArgumentException(
                sprintf("Parameter 1 and 2 of %s must be a string.", __METHOD__)
            );
        }

        if (!isset($this->aliases[$alias])) {
            $this->aliases[$alias] = $this->make($abstract);
        }

        return $this;
    }
public function register ( $ alias , $ abstract ) { if ( ! is_string ( $ alias ) || ! is_string ( $ abstract ) ) { throw new \ InvalidArgumentException ( sprintf ( "Parameter 1 and 2 of %s must be a string." , __METHOD__ ) ) ; } if ( ! isset ( $ this -> aliases [ $ alias ] ) ) { $ this -> aliases [ $ alias ] = $ this -> make ( $ abstract ) ; } return $ this ; }
Register a service alias.

@param string $alias The alias name.
@param string $abstract The class name.
Register a service alias .