public function registerDynamicType($typeName)
    {
        if (isset($this->bindings[$typeName])) {
            throw new \InvalidArgumentException("`$typeName` is already registerd.");
        }

        $type = new \ReflectionClass($typeName);
        $this->bindings[$typeName] = new DynamicService($type);

        return $this;
    }
public function registerDynamicType($typeName)
    {
        if (isset($this->bindings[$typeName])) {
            throw new \InvalidArgumentException("`$typeName` is already registerd.");
        }

        $type = new \ReflectionClass($typeName);
        $this->bindings[$typeName] = new DynamicService($type);

        return $this;
    }
public function registerDynamicType ( $ typeName ) { if ( isset ( $ this -> bindings [ $ typeName ] ) ) { throw new \ InvalidArgumentException ( "`$typeName` is already registerd." ) ; } $ type = new \ ReflectionClass ( $ typeName ) ; $ this -> bindings [ $ typeName ] = new DynamicService ( $ type ) ; return $ this ; }
Registers the type to use dynamic binding.

@param string $typeName The fully qualified class name.
@return DependencyResolver
Registers the type to use dynamic binding .