public function setName($name)
    {
        if (null !== $name) {
            Assert::string($name, 'The application name must be a string. Got: %s');
            Assert::notEmpty($name, 'The application name must not be empty.');
            Assert::regex($name, '~^[a-zA-Z0-9\-]+$~', 'The application name must contain letters, numbers and hyphens only. Did you mean to call setDisplayName()?');
        }

        $this->name = $name;

        return $this;
    }
public function setName($name)
    {
        if (null !== $name) {
            Assert::string($name, 'The application name must be a string. Got: %s');
            Assert::notEmpty($name, 'The application name must not be empty.');
            Assert::regex($name, '~^[a-zA-Z0-9\-]+$~', 'The application name must contain letters, numbers and hyphens only. Did you mean to call setDisplayName()?');
        }

        $this->name = $name;

        return $this;
    }
public function setName ( $ name ) { if ( null !== $ name ) { Assert :: string ( $ name , 'The application name must be a string. Got: %s' ) ; Assert :: notEmpty ( $ name , 'The application name must not be empty.' ) ; Assert :: regex ( $ name , '~^[a-zA-Z0-9\-]+$~' , 'The application name must contain letters, numbers and hyphens only. Did you mean to call setDisplayName()?' ) ; } $ this -> name = $ name ; return $ this ; }
Sets the name of the application.

@param string $name The application name.

@return static The current instance.

@see getName()
Sets the name of the application .