Adds an instance or closure as a proxy target

@param string $alias The statical name you call
@param string $proxy The namespaced proxy class
@param mixed $target The target instance or closure
@param mixed $namespace Optional namespace
513573
public function addProxyInstance($alias, $proxy, $target, $namespace = null)
    {
        $proxy = Input::checkNamespace($proxy);

        if (!is_object($target)) {
            throw new \InvalidArgumentException('Target must be an instance or closure.');
        }

        $this->addProxy($proxy, null, $target);
        $this->aliasManager->add($proxy, $alias);

        if ($namespace) {
            $this->addNamespace($alias, $namespace);
        }
    }
226517
public void setProxy(Proxy proxy) {
        if (verifiers.removeIf(verifier -> verifier instanceof SkillRequestSignatureVerifier)) {
            verifiers.add(new SkillRequestSignatureVerifier(proxy));
        }
    }
1315016
private function setProxy($proxy, $onlyProtocol = null)
    {
        $proxy = trim($proxy);
        if (null == $onlyProtocol) {
            $this->proxySettings['http'] = $proxy;
            $this->proxySettings['https'] = $proxy;
        } else {
            $this->proxySettings[$onlyProtocol] = $proxy;
        }
    }
1251638
final public function make(string $alias, array $parameters = [], string $context = null)
    {
        if (!isset($this->bindings[$alias])) {
            //No direct instructions how to construct class, make is automatically
            return $this->autowire($alias, $parameters, $context);
        }

        $binding = $this->bindings[$alias];

        if (is_object($binding)) {
            //When binding is instance, assuming singleton
            return $binding;
        }

        if (is_string($binding)) {
            //Binding is pointing to something else
            return $this->make($binding, $parameters, $context);
        }

        if ($binding[0] === $alias) {
            $instance = $this->autowire($alias, $parameters, $context);
        } else {
            $instance = $this->evaluateBinding($alias, $binding[0], $parameters, $context);
        }

        if ($binding[1]) {
            //Indicates singleton
            $this->bindings[$alias] = $instance;
        }

        return $instance;
    }
91163
public static function registerTypeAlias($alias, $type)
    {
        Assert::notBlank($alias, 'Alias name cannot be blank');
        Assert::notBlank($type, 'Target type name cannot be blank');
        self::$aliases[strtolower($alias)] = $type;
    }
1359098
public function setAlias($name, $alias)
    {
        if ($alias === null && isset($this->aliases[$name])) {
            unset($this->aliases[$name]);
        } else {
            $this->aliases[$name] = $alias;
        }

        return $this;
    }
308498
public function addCommand($callback, $alias = null, $default = false)
    {
        if ($alias instanceof \Closure && is_string($callback)) {
            list($alias, $callback) = array($callback, $alias);
        }
        if (is_array($callback) && is_string($callback[0])) {
            $callback = implode('::', $callback);
        }
        
        $name = '';
        if (is_string($callback)) {
            $name = $callback;
            if (is_callable($callback)) {
                if (strpos($callback, '::') !== false) {
                    list($classname, $methodname) = explode('::', $callback);
                    $name = Utils::dashized($methodname);
                } else {
                    $name = strtolower(trim(str_replace('_', '-', $name), '-'));
                }
            } else {
                if (substr($name, -7) === 'Command') {
                    $name = substr($name, 0, -7);
                }
                $name = Utils::dashized(basename(str_replace('\\', '/', $name)));
            }
        } else if (is_object($callback) && !($callback instanceof Closure)) {
            $classname = get_class($callback);
            if (!($callback instanceof Command)) {
                throw new ConsoleException("'$classname' must inherit from 'ConsoleKit\Command'");
            }
            if (substr($classname, -7) === 'Command') {
                $classname = substr($classname, 0, -7);
            }
            $name = Utils::dashized(basename(str_replace('\\', '/', $classname)));
        } else if (!$alias) {
            throw new ConsoleException("Commands using closures must have an alias");
        }

        $name = $alias ?: $name;
        $this->commands[$name] = $callback;
        if ($default) {
            $this->defaultCommand = $name;
        }
        return $this;
    }
40052
public function withAlias($aliasAction, $alias)
    {
        $this->aliasAction = $aliasAction;
        $this->alias = $alias;
        return $this;
    }
511052
public function alias($target, $alias, array $options = [], array $attrs = [])
    {
        $this->normalizeUri($target, $name);

        $this->aliases[$name] = [
            'alias' => $alias,
            'options' => $options,
            'attrs' => $attrs
        ];

        return $this;
    }
940460
protected function registerProxies() {

		Proxy::setContainer( $this );

		foreach ( $this->proxies as $class => $alias ) {
			class_alias( $class, $alias );
		}
	}
410336
public function createAlias($alias)
    {
        class_alias('Pixie\\AliasFacade', $alias);
        $builder = $this->container->build('\\Pixie\\QueryBuilder\\QueryBuilderHandler', array($this));
        AliasFacade::setQueryBuilderInstance($builder);
    }
1372314
public void setProxy(Proxy proxy) {
        if (config.delivery instanceof HttpDelivery) {
            ((HttpDelivery) config.delivery).setProxy(proxy);
        }
        if (config.sessionDelivery instanceof HttpDelivery) {
            ((HttpDelivery) config.sessionDelivery).setProxy(proxy);
        }
    }
776427
public static function setAlias($alias, $identifier)
    {
        $identifier = self::getIdentifier($identifier);
        self::$_aliases[$alias] = $identifier;
    }
982903
public function setAlias(string $name, $alias): void
    {
        foreach ((array)$alias as $aliasName) {
            if (!isset($this->aliases[$aliasName])) {
                $this->aliases[$aliasName] = $name;
            }
        }
    }
516609
public function useAlias($alias)
    {
        $aliasGetter = 'get'.ucfirst($alias).'Alias';

        if (! method_exists($this->indexConfigurator, $aliasGetter)) {
            throw new Exception(sprintf(
                'The index configurator %s doesn\'t have getter for the %s alias.',
                get_class($this->indexConfigurator),
                $alias
            ));
        }

        $this->payload['index'] = call_user_func([$this->indexConfigurator, $aliasGetter]);

        return $this;
    }
826249
public function alias($alias, $name) {
		if (is_array($alias)) {
			foreach ($alias as $key) {
				$this->alias($key, $name);
			}

			return;
		}

		$this->aliases[$alias] = $name;
	}
983746
public function alias($alias, $binding)
    {
        if ($this->resolve($binding)) {
            $this->bindings[$alias] = $this->bindings[$binding];
            $this->cache[$alias] = $this->cache[$binding];
            $this->aliases[$alias] = $binding;
        }
    }