From 6786f6db1838be285d46e432e5f02f1349868aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Tue, 18 Mar 2014 00:05:29 +0100 Subject: [PATCH] [Console] Rename Command::setProcessName to Command::setProcessTitle To be more consistant with the underlying system. --- src/Symfony/Component/Console/CHANGELOG.md | 2 +- .../Component/Console/Command/Command.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Component/Console/CHANGELOG.md b/src/Symfony/Component/Console/CHANGELOG.md index 30969e8b7c..47dcebd31c 100644 --- a/src/Symfony/Component/Console/CHANGELOG.md +++ b/src/Symfony/Component/Console/CHANGELOG.md @@ -7,7 +7,7 @@ CHANGELOG * deprecated TableHelper in favor of Table * deprecated ProgressHelper in favor of ProgressBar * added a way to set a default command instead of `ListCommand` - * added a way to set the process name of a command + * added a way to set the process title of a command 2.4.0 ----- diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 679a1c01b9..7b0b45c89b 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -33,7 +33,7 @@ class Command { private $application; private $name; - private $processName; + private $processTitle; private $aliases = array(); private $definition; private $help; @@ -213,11 +213,11 @@ class Command */ public function run(InputInterface $input, OutputInterface $output) { - if (null !== $this->processName) { + if (null !== $this->processTitle) { if (function_exists('cli_set_process_title')) { - cli_set_process_title($this->processName); + cli_set_process_title($this->processTitle); } elseif (function_exists('setproctitle')) { - setproctitle($this->processName); + setproctitle($this->processTitle); } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) { $output->writeln('Install the proctitle PECL to be able to change the process title.'); } @@ -423,20 +423,20 @@ class Command } /** - * Sets the process name of the command. + * Sets the process title of the command. * * This feature should be used only when creating a long process command, * like a daemon. * * PHP 5.5+ or the proctitle PECL library is required * - * @param string $name The process name + * @param string $title The process title * * @return Command The current instance */ - public function setProcessName($name) + public function setProcessTitle($title) { - $this->processName = $name; + $this->processTitle = $title; return $this; }