public function setName($name)
    {
        if ($this->isNameValid($name) !== true) {
            throw new InvalidArgumentException('The name is not valid.');
        }

        $this->name = $name;

        return $this;
    }
public function setName($name)
    {
        if ($this->isNameValid($name) !== true) {
            throw new InvalidArgumentException('The name is not valid.');
        }

        $this->name = $name;

        return $this;
    }
public function setName ( $ name ) { if ( $ this -> isNameValid ( $ name ) !== true ) { throw new InvalidArgumentException ( 'The name is not valid.' ) ; } $ this -> name = $ name ; return $ this ; }
Set the name of the entity.

@param string $name The name to set.
@return \Wingu\OctopusCore\CodeGenerator\PHP\AbstractEntityGenerator
@throws \Wingu\OctopusCore\CodeGenerator\Exceptions\InvalidArgumentException If the name is invalid.
Set the name of the entity .