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

Procedural File: shell.php

Source Location: /vendor/trax/php_shell/shell.php



Classes:

PHP_Shell


Page Details:

(PHP 5)



Tags:

version:  $Id:$
copyright:  

(c) 2005 John Peterson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

filesource:  Source Code for this file


Includes:

require_once("php_shell/shell_prototypes.php") [line 157]
PHP_Shell

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

to customize the operation of the shell you can either extend the PHP_Shell class or declare a external autoload or error-handler. If you want to use your own print-out functions declare __shell_print_vars().

  • __shell_error_handler()
  • __autoload()
  • __shell_print_vars()
To keep the namespace clashing between shell and your program as small as possible all public variables and functions from the shell are prefixed with __shell:

  • $__shell is the object of the shell can be read, this is the shell object itself, don't touch it
  • $__shell_retval is the return value of the eval() before it is printed can't be read, but overwrites existing vars with this name
  • $__shell_exception is the catched Exception on Warnings, Notices, .. can't be read, but overwrites existing vars with this name








__shell_readline_complete [line 1195]

array __shell_readline_complete( string $str, integer $pos)

a readline completion callback



Tags:

return:  list of possible matches


Parameters

string   $str   linebuffer
integer   $pos   position in linebuffer
[ Top ]



Documentation generated on Mon, 21 May 2007 22:28:49 -0600 by phpDocumentor 1.3.2