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

Class: PHP_Shell

Source Location: /PHP_Shell-0.3.2/PHP/Shell.php

Class Overview


PHP_Shell


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2006 Jan Kneschke

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 107]
PHP_Shell

a interactive PHP Shell with tab-completion and history it can catch FATAL errors before executing the code

Extensions are provided through three side-classes:

  • PHP_Shell_Commands
  • PHP_Shell_Options
  • PHP_Shell_Extensions



[ Top ]


Class Variables

$code =

[line 113]

current code-buffer
  • Access: protected

Type:   string


[ Top ]

$code_buffer =

[line 132]

  • Access: protected

Type:   mixed


[ Top ]

$have_readline =

[line 119]

set if readline support is enabled
  • Access: protected

Type:   bool


[ Top ]

$stdin =

[line 130]

  • Access: protected

Type:   mixed


[ Top ]

$version =  '0.3.1'

[line 125]

current version of the class
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 137]

PHP_Shell __construct( )

init the shell and change if readline support is available
  • Access: public

[ Top ]

appendCode   [line 1118]

void appendCode( string $code)

append code to the code-buffer
  • Access: public

Parameters:

string   $code     input buffer

[ Top ]

cmdHelp   [line 980]

string cmdHelp( string $l)

get the inline help
  • Return: the inline help as string
  • Access: public

Parameters:

string   $l     command line

[ Top ]

cmdLicense   [line 1004]

string cmdLicense( string $l)

get the license string
  • Return: the inline help as string
  • Access: public

Parameters:

string   $l     command line

[ Top ]

cmdQuit   [line 1039]

bool cmdQuit( string $l)

handle the 'quit' command

Parameters:

string   $l     command line

[ Top ]

getCode   [line 1096]

string getCode( )

get the code-buffer
  • Return: the code-buffer
  • Access: public

[ Top ]

getVersion   [line 1142]

string getVersion( )

get version of the class
  • Return: version-string
  • Access: public

[ Top ]

hasReadline   [line 1132]

bool hasReadline( )

check if readline support is enabled
  • Return: true if enabled, false otherwise
  • Access: public

[ Top ]

input   [line 1051]

bool input( )

handle the input line

read the input and handle the commands of the shell

  • Return: false on 'quit' or EOF, true otherwise
  • Access: public

[ Top ]

parse   [line 187]

int parse( )

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: 0 if a executable statement is in the code-buffer, non-zero otherwise
  • Access: public

[ Top ]

readline   [line 938]

string readline( )

show the prompt and fetch a single line

uses readline() if avaialbe

  • Return: a input-line
  • Access: public

[ Top ]

resetCode   [line 1106]

void resetCode( )

reset the code-buffer
  • Access: public

[ Top ]


Documentation generated on Mon, 12 Dec 2011 23:00:18 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.