src/ObjectManager.php
public function get(string $className, ...$constructorArguments)
    {
        if (!isset($this->container[$className])) {
            $instance = $this->createWithArguments(
                $className,
                $constructorArguments,
                $implementationClassName
            );

            $this->container[$className] = $instance;
            if ($implementationClassName) {
                $this->container[$implementationClassName] = $instance;
            }
        }

        return $this->container[$className];
    }
public function get(string $className, ...$constructorArguments)
    {
        if (!isset($this->container[$className])) {
            $instance = $this->createWithArguments(
                $className,
                $constructorArguments,
                $implementationClassName
            );

            $this->container[$className] = $instance;
            if ($implementationClassName) {
                $this->container[$implementationClassName] = $instance;
            }
        }

        return $this->container[$className];
    }
public function get ( string $ className , ... $ constructorArguments ) { if ( ! isset ( $ this -> container [ $ className ] ) ) { $ instance = $ this -> createWithArguments ( $ className , $ constructorArguments , $ implementationClassName ) ; $ this -> container [ $ className ] = $ instance ; if ( $ implementationClassName ) { $ this -> container [ $ implementationClassName ] = $ instance ; } } return $ this -> container [ $ className ] ; }
Retrieve the class from the container or creates a new instance

@param string $className
@param array  $constructorArguments
@return object
Retrieve the class from the container or creates a new instance