Beispiel #1
0
bool CmdUser::help(DebuggerClient *client) {
  client->helpTitle("User Extended Command");
  helpImpl(client, "y");
  client->helpBody(
    "These commands are implemented and installed in PHP by implementing "
    "DebuggerCommand and calling hphpd_install_user_command(). For example\n"
    "\n"
    "  class MyCommand implements DebuggerCommand {\n"
    "    public function help($client) {\n"
    "      $client->helpTitle(\"Hello Command\");\n"
    "      $client->helpCmds(\"y [h]ello\", \"prints welcome message\");\n"
    "      return true;\n"
    "    }\n"
    "    public function onClient($client) {\n"
    "      $client->output(\"Hello, world!\");\n"
    "      return true;\n"
    "    }\n"
    "  }\n"
    "\n"
    "  hphpd_install_user_command('hello', 'MyCommand');\n"
    "\n"
    "Type '[i]nfo DebuggerCommand' for complete DebuggerCommand interface. "
    "Type '[i]nfo DebuggerClient' for complete DebuggerClient interface that "
    "you can use when implementing those $client callbacks. "
    "Type '[i]nfo DebuggerProxy' for complete DebuggerProxy interface that "
    "you can use when implementing those $proxy callbacks."
  );
  return true;
}
Beispiel #2
0
bool CmdExtended::help(DebuggerClient *client) {
  client->helpTitle("Extended Command");
  helpImpl(client, "x");
  return true;
}