apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: PHP_Shell_Commands

Source Location: /PHP_Shell-0.3.0/PHP/Shell/Commands.php

Class Overview


Commands for the PHP_Shell


Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 17]
Commands for the PHP_Shell

Extensions can register their own commands for the shell like the InlineHelp Extension which provides inline help for all functions

It uses the pattern '? <string>' to catch the cmdline strings.

registerCommand() should be called by the extensions in the register() method. Its parameters are

  • the regex which matches the command
  • the object and the method to call if the command is matched
  • the human readable command string and the description for the help



[ Top ]


Class Variables

$commands = array()

[line 33]

registered commands

array('quit' => ... )

  • See: registerCommand
  • Access: protected

Type:   array


[ Top ]

$instance =

[line 23]

  • Access: protected

Type:   mixed


[ Top ]



Method Detail

getCommands   [line 59]

all getCommands( )

return a copy of the commands array
  • Return: commands
  • Access: public

[ Top ]

getInstance   [line 63]

void getInstance( )


[ Top ]

registerCommand   [line 44]

void registerCommand( string $regex, string $obj, string $method, string $cmd, string $help)

register your own command for the shell
  • Access: public

Parameters:

string   $regex   —  a regex to match against the input line
string   $obj   —  a Object
string   $method   —  a method in the object to call of the regex matches
string   $cmd   —  the command string for the help
string   $help   —  the full help description for this command

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:40:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.