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

File: php-shell-cmd.php

Source Location: /PHP_Shell-0.3.2/scripts/php-shell-cmd.php

Classes:

Page Details:

the wrapper around the PHP_Shell class

PHP Version 5

  • load extensions
  • set default error-handler
  • add exec-hooks for the extensions
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

Includes:

require_once("PHP/Shell/Extensions/ExecutionTime.php") [line 40]
require_once("PHP/Shell/Extensions/Colour.php") [line 39]
require_once("PHP/Shell/Extensions/Autoload.php") [line 37]
require_once("PHP/Shell/Extensions/AutoloadDebug.php") [line 38]
require_once("PHP/Shell/Extensions/InlineHelp.php") [line 41]
require_once("PHP/Shell/Extensions/VerbosePrint.php") [line 42]
require_once("PHP/Shell/Extensions/LoadScript.php") [line 43]
require_once("PHP/Shell/Extensions/Echo.php") [line 44]
require_once("PHP/Shell.php") [line 36]

PHP_Shell_defaultErrorHandler [line 63]

void PHP_Shell_defaultErrorHandler( integer $errno, string $errstr, string $errfile, interger $errline, mixed $errctx)

default error-handler

Instead of printing the NOTICE or WARNING from php we wan't the turn non-FATAL messages into exceptions and handle them in our own way.

you can set your own error-handler by createing a function named __shell_error_handler



Parameters

integer   $errno   Error-Number
string   $errstr   Error-Message
string   $errfile   Filename where the error was raised
interger   $errline   Line-Number in the File
mixed   $errctx   ...
[ Top ]



__autoload [line 124]

void __autoload( string $classname)

default autoloader

If a class doesn't exist try to load it by guessing the filename class PHP_Shell should be located in PHP/Shell.php.

you can set your own autoloader by defining __autoload() before including this file



Parameters

string   $classname   name of the class
[ Top ]



Documentation generated on Mon, 11 Mar 2019 15:46:52 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.