From d2bba220130c367cc4c96eeeccd016c6b5bd46d7 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 14 Oct 2015 05:44:17 +0000 Subject: [PATCH] cli : don't display the private/protected methods, they can't be called git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2363 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- cli.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli.php b/cli.php index 13f54d7..610b064 100644 --- a/cli.php +++ b/cli.php @@ -184,6 +184,9 @@ class cli { if ($method->name === "__construct") continue; + // The private/protected methods can not be called + if ($method->isPrivate () || $method->isProtected ()) + continue; if ($key > 0 && $argv[0] !== "-listmethodsonly") echo "\n"; if ($argv[0] !== "-listmethodsonly")