File tree 3 files changed +8
-8
lines changed
src/Symfony/Component/Console
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class Command
34
34
private $ processTitle ;
35
35
private $ aliases = array ();
36
36
private $ definition ;
37
- private $ public = true ;
37
+ private $ hidden = false ;
38
38
private $ help ;
39
39
private $ description ;
40
40
private $ ignoreValidationErrors = false ;
@@ -448,23 +448,23 @@ public function getName()
448
448
}
449
449
450
450
/**
451
- * @param bool $public Whether the command should be publicly shown or not.
451
+ * @param bool $hidden Whether or not the command should be hidden from the list of commands
452
452
*
453
453
* @return Command The current instance
454
454
*/
455
- public function setPublic ( $ public )
455
+ public function setHidden ( $ hidden )
456
456
{
457
- $ this ->public = (bool ) $ public ;
457
+ $ this ->hidden = (bool ) $ hidden ;
458
458
459
459
return $ this ;
460
460
}
461
461
462
462
/**
463
463
* @return bool Whether the command should be publicly shown or not.
464
464
*/
465
- public function isPublic ()
465
+ public function isHidden ()
466
466
{
467
- return $ this ->public ;
467
+ return $ this ->hidden ;
468
468
}
469
469
470
470
/**
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ private function inspectApplication()
112
112
113
113
/** @var Command $command */
114
114
foreach ($ commands as $ name => $ command ) {
115
- if (!$ command ->getName () || ! $ command ->isPublic ()) {
115
+ if (!$ command ->getName () || $ command ->isHidden ()) {
116
116
continue ;
117
117
}
118
118
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ protected function configure()
21
21
->setName ('descriptor:command3 ' )
22
22
->setDescription ('command 3 description ' )
23
23
->setHelp ('command 3 help ' )
24
- ->setPublic ( false )
24
+ ->setHidden ( true )
25
25
;
26
26
}
27
27
}
You can’t perform that action at this time.
0 commit comments