File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
src/Symfony/Component/Console Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff 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 be publicly shown or not.
451+ * @param bool $hidden Whether or not the command should be hidden from the list of commands
452452 *
453453 * @return Command The current instance
454454 */
455- public function setPublic ( $ public )
455+ public function setHidden ( $ 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- public function isPublic ()
465+ public function isHidden ()
466466 {
467- return $ this ->public ;
467+ return $ this ->hidden ;
468468 }
469469
470470 /**
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ private function inspectApplication()
112112
113113 /** @var Command $command */
114114 foreach ($ commands as $ name => $ command ) {
115- if (!$ command ->getName () || ! $ command ->isPublic ()) {
115+ if (!$ command ->getName () || $ command ->isHidden ()) {
116116 continue ;
117117 }
118118
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments