PEAR_Command::registerCommands() – scan the command directory


require_once 'PEAR/command.php';

bool PEAR_Command::registerCommands ( bool $merge = false , string $dir = null )


Scan through the Command directory looking for classes and see what commands they implement.


boolean $merge

if FALSE (default), the new list of commands should replace the current one. If TRUE, new entries will be merged with old.

string $dir

where (what directory) to look for classes, defaults to the Command subdirectory of the directory from where this file (__FILE__) is included.

Return value

bool TRUE on success


Possible PEAR_Error values
Error code Error value Meaning Solution


This function should be called statically.

get list of command shortcuts. (Previous) PEAR_Common (Next)
Last updated: Thu, 21 Jun 2018 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.