Create new objects of a class or interface with this method.
It uses a mapping table to map the given $name to a implementing class, thus providing a kind of DIC.

@param string $name
@param array $arguments for constructor
@return object
10929
public function get($name, array $arguments = null)
    {
        $this->load();
        if ($arguments === null) {
            $arguments = [$this->env];
        }
        if (isset($this->config[$name])) {
            $entry = $this->config[$name];
            if (is_callable($entry)) {
                return $entry(...$arguments);
            } elseif (is_object($entry)) {
                return $entry;
            } else {
                $name = $entry;
            }
        }
        return new $name(...$arguments);
    }
9771
private function createInstance(ReflectionClass $reflection, array $arguments)
    {
        if (count($arguments)) {
            return $reflection->newInstanceArgs($arguments);
        }

        return $reflection->newInstance();
    }
436831
public function build($name, $arg1 = null, $arg2 = null, $arg3 = null, $arg4 = null)
    {
        $class = $this->getClass($name);

        if ($class) {
            return new $class($arg1, $arg2, $arg3, $arg4);
        }

        return null;
    }
247589
protected function ___classMocker_call($name, $arguments)
    {
        $this->allowPrivateScope();
        $result = $this->__call($name, $arguments);
        $this->disallowPrivateScope();

        return $result;
    }
1046701
public function _call(string $name, &...$arguments)
    {
        $method = $this->getReflection()->getMethod($name);
        $method->setAccessible(true);

        return $method->invokeArgs($this->getInstance(), $arguments);
    }
1198622
protected function getInstanceRule($name, array $arguments)
    {
        $reflect = new \ReflectionClass($this->rules[$name]);
        return $reflect->newInstanceArgs($arguments);
    }
1100756
public function addCriteria($name, $arguments = [])
    {
        if (method_exists($this, $name)) {
            $this->modelCriterias[$name] = $arguments;
        } else {
            Throw new \Exception('Criteria ' . $name . ' does not exist.');
        }

        return $this;
    }
963452
public function addPath($name, $argument = null)
    {
        $this->path[] = $name;
        if ($argument !== null) {
            $this->path[] = $argument;
        }

        return $this;
    }
1070752
private function callSessionMethod(string $name, array $arguments)
    {
        return \call_user_func_array(
            [
                $this->getFactory()->getSession(),
                $name
            ],
            $arguments
        );
    }
1363602
public function makeClass($alias, array $arguments)
    {
        $reflection = new \ReflectionClass($this->getAlias($alias));

        return $reflection->newInstanceArgs($arguments);
    }
1088108
protected function routeRemainingMethod($name, array $arguments)
    {
        // If we still have something left, let's figure out what it is
        if ($this->router->exists($name)) {
            $obj = $this->buildTerminalObject($name, $arguments);

            // If something was returned, return it
            if (is_object($obj)) {
                return $obj;
            }
        } elseif ($this->settings->exists($name)) {
            $this->settings->add($name, reset($arguments));
        // Handle passthroughs to the arguments manager.
        } else {
            // If we can't find it at this point, let's fail gracefully
            $this->out(reset($arguments));
        }
    }
158569
protected function createEndpoint(string $name, array $args) : EndpointInterface {
        $className = $this->getEndpointClassName($name);

        // aditional parameters
        $args[] = $this->authentication;
        $args[] = $this->client;
        $args[] = $this->throwsExceptions;
        $args[] = $this->baseUrl;

        return new $className(...$args);
    }
705391
protected function addMethod($name, array $arguments = array())
    {
        $this->methods[] = new MethodCall($this, $name, $arguments);

        return $this;
    }
763235
public function createMeta($id, array $arguments)
    {
        $parameters = $this->resolveMetaArguments($arguments);

        return $this->resolveMeta('make', [
            $id,
            $parameters['key'],
            $parameters['value'],
            $parameters['unique'],
        ]);
    }
298699
protected function getRealInstance(string $name, ReflectionClass $class, array $arguments, array $config)
    {
        $instance = $class->newInstanceArgs($arguments);
        $instance = $this->prepareService($name, $instance, $class, $config);

        return $instance;
    }
1362573
public function create($name, $argument = null)
    {
        $constructorArgs = func_get_args();
        array_shift($constructorArgs);
        return $this->createWithArgs($name, $constructorArgs);
    }
1329843
public function create($name)
    {
        $name = $this->resolveName($name);

        $prototype = $this->getPrototype($name);
        $product = $prototype->copy();        
        
        foreach($this->invocationsMethodsOnCreate[$name] as $methodName => $argTag)
        {
            if(isset($this->invokeArgs[$argTag]))
            {
                $arg = $this->invokeArgs[$argTag];
                $product->$methodName($arg);
            }
        }

        return $product;
    }