[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/3rdParty/PhpShell/PHP/ -> Shell.php (sommaire)

A interactive PHP Shell The more I work with other languages like python and ruby I like their way how they work on problems. While PHP is very forgiving on errors, it is weak on the debugging side. It was missing a simple to use interactive shell for years. Python and Ruby have their ipython and iruby shell which give you a direct way to interact with the objects. No need to write a script and execute it afterwards.

Poids: 1090 lignes (37 kb)
Inclus ou requis: 1 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

PHP_Shell:: (13 méthodes):
  __construct()
  parse()
  readline()
  cmdHelp()
  cmdLicense()
  cmdQuit()
  input()
  getCode()
  resetCode()
  appendCode()
  hasReadline()
  getVersion()
  __shell_readline_complete()


Classe: PHP_Shell  - X-Ref

__construct()   X-Ref
init the shell and change if readline support is available


parse()   X-Ref
parse the PHP code

we parse before we eval() the code to
- fetch fatal errors before they come up
- know about where we have to wait for closing braces

return: int 0 if a executable statement is in the code-buffer, non-zero otherwise

readline()   X-Ref
show the prompt and fetch a single line

uses readline() if avaialbe

return: string a input-line

cmdHelp($l)   X-Ref
get the inline help

return: string the inline help as string

cmdLicense($l)   X-Ref
get the license string

return: string the inline help as string

cmdQuit($l)   X-Ref
handle the 'quit' command

return: bool false to leave the input() call

input()   X-Ref
handle the input line

read the input and handle the commands of the shell

return: bool false on 'quit' or EOF, true otherwise

getCode()   X-Ref
get the code-buffer

return: string the code-buffer

resetCode()   X-Ref
reset the code-buffer


appendCode($code)   X-Ref
append code to the code-buffer

param: string $code input buffer

hasReadline()   X-Ref
check if readline support is enabled

return: bool true if enabled, false otherwise

getVersion()   X-Ref
get version of the class

return: string version-string

__shell_readline_complete($str, $pos)   X-Ref
a readline completion callback

param: string $str linebuffer
param: integer $pos position in linebuffer
return: array list of possible matches



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7