src/Injector.php
public function alias(string $from, string $to, array $params = null): void
    {
        if (!empty($params)) {
            $this->config->registerClassParameters($to, $params);
        }
        $this->config->registerClassAlias($from, $to);
    }
public function alias(string $from, string $to, array $params = null): void
    {
        if (!empty($params)) {
            $this->config->registerClassParameters($to, $params);
        }
        $this->config->registerClassAlias($from, $to);
    }
public function alias ( string $ from , string $ to , array $ params = null ) : void { if ( ! empty ( $ params ) ) { $ this -> config -> registerClassParameters ( $ to , $ params ) ; } $ this -> config -> registerClassAlias ( $ from , $ to ) ; }
Create a global alias for an interface.

Every time the injector sees this type, it will use the
given implementation instead of trying to use the
interface.

@param string $from class name to replace.
@param string $to new class name that should be used instead.
Create a global alias for an interface .