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

        $this->namedValues[$valueName] = true;

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

        $this->namedValues[$valueName] = true;

        return $this;
    }
public function registerNamedValue ( $ valueName ) { if ( isset ( $ this -> namedValues [ $ valueName ] ) ) { throw new \ InvalidArgumentException ( "`$valueName` is already registerd." ) ; } $ this -> namedValues [ $ valueName ] = true ; return $ this ; }
Registers the value name to use name-based binding.

@param string $valueName The name of constructor's parameter
@return DependencyResolver
Registers the value name to use name - based binding .