public function addParameter(ParameterGenerator $parameter)
    {
        $name = $parameter->getName();
        if (isset($this->parameters[$name]) === true) {
            throw new InvalidArgumentException('A parameter with the name "' . $name . '" is already added.');
        }

        $this->parameters[$name] = $parameter;

        return $this;
    }
public function addParameter(ParameterGenerator $parameter)
    {
        $name = $parameter->getName();
        if (isset($this->parameters[$name]) === true) {
            throw new InvalidArgumentException('A parameter with the name "' . $name . '" is already added.');
        }

        $this->parameters[$name] = $parameter;

        return $this;
    }
public function addParameter ( ParameterGenerator $ parameter ) { $ name = $ parameter -> getName ( ) ; if ( isset ( $ this -> parameters [ $ name ] ) === true ) { throw new InvalidArgumentException ( 'A parameter with the name "' . $ name . '" is already added.' ) ; } $ this -> parameters [ $ name ] = $ parameter ; return $ this ; }
Add a parameter to the entity.

@param \Wingu\OctopusCore\CodeGenerator\PHP\ParameterGenerator $parameter The parameter to add.
@return \Wingu\OctopusCore\CodeGenerator\PHP\PHPGenerator
@throws \Wingu\OctopusCore\CodeGenerator\Exceptions\InvalidArgumentException If the a parameter with the same name is already added.
Add a parameter to the entity .