Back to ConsoleApplication class

Method setName

public void
setName
(string $name)
Set the name of the application.
Parameters
  • string $name The new application name.
Returns
  • void
Since
  • 4.0.0
-
  • \RuntimeException because the application name cannot be changed

Method setName - Source code

/**
 * Set the name of the application.
 *
 * @param   string  $name  The new application name.
 *
 * @return  void
 *
 * @since   4.0.0
 * @throws  \RuntimeException because the application name cannot be changed
 */
public function setName(string $name) : void
{
    throw new \RuntimeException('The console application name cannot be changed');
}