src/Container/Container.php
public function create($className, array $parameters = [])
    {
        if ($this->injectSelf($className)) {
            return $this;
        }

        $className = $this->resolve($className);

        $classMeta = $this->reflectionService->getClassMetaReflection($className);

        if ($classMeta->isInterface()) {
            throw new RuntimeException('Tried to create an interface ( ' . $className . ' ) without registered implementation.');
        }

        $object = $this->createObject($className, $parameters, $classMeta);

        return $object;
    }
public function create($className, array $parameters = [])
    {
        if ($this->injectSelf($className)) {
            return $this;
        }

        $className = $this->resolve($className);

        $classMeta = $this->reflectionService->getClassMetaReflection($className);

        if ($classMeta->isInterface()) {
            throw new RuntimeException('Tried to create an interface ( ' . $className . ' ) without registered implementation.');
        }

        $object = $this->createObject($className, $parameters, $classMeta);

        return $object;
    }
Create a class with supplied parameters.

Before a class is created the container will first check for a suitable resolver.

If an invalid class name was given, e.g. an interface without registered resolver,
throw a RuntimeException.

@param string $className
@param array $parameters
@return object
@throws RuntimeException