Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf900ef0

Browse files
committed
rename Command::private to Command::hidden
1 parent4eeb1f0 commitf900ef0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

‎src/Symfony/Component/Console/Command/Command.php‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Command
3434
private$processTitle;
3535
private$aliases =array();
3636
private$definition;
37-
private$public =true;
37+
private$hidden =false;
3838
private$help;
3939
private$description;
4040
private$ignoreValidationErrors =false;
@@ -448,23 +448,23 @@ public function getName()
448448
}
449449

450450
/**
451-
* @param bool $public Whether the command should bepublicly shown or not.
451+
* @param bool $hidden Whetheror notthe command should behidden from the list of commands
452452
*
453453
* @return Command The current instance
454454
*/
455-
publicfunctionsetPublic($public)
455+
publicfunctionsetHidden($hidden)
456456
{
457-
$this->public = (bool)$public;
457+
$this->hidden = (bool)$hidden;
458458

459459
return$this;
460460
}
461461

462462
/**
463463
* @return bool Whether the command should be publicly shown or not.
464464
*/
465-
publicfunctionisPublic()
465+
publicfunctionisHidden()
466466
{
467-
return$this->public;
467+
return$this->hidden;
468468
}
469469

470470
/**

‎src/Symfony/Component/Console/Descriptor/ApplicationDescription.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private function inspectApplication()
112112

113113
/** @var Command $command */
114114
foreach ($commandsas$name =>$command) {
115-
if (!$command->getName() ||!$command->isPublic()) {
115+
if (!$command->getName() ||$command->isHidden()) {
116116
continue;
117117
}
118118

‎src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand3.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected function configure()
2121
->setName('descriptor:command3')
2222
->setDescription('command 3 description')
2323
->setHelp('command 3 help')
24-
->setPublic(false)
24+
->setHidden(true)
2525
;
2626
}
2727
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp