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

File: php-shell-cmd.php

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

Classes:

Page Details:

Includes:

require_once("PHP/Shell/Extensions/AutoloadDebug.php") [line 28]
require_once("PHP/Shell/Extensions/Autoload.php") [line 27]
require_once("PHP/Shell/Extensions/Colour.php") [line 29]
require_once("PHP/Shell/Extensions/VerbosePrint.php") [line 32]
require_once("PHP/Shell.php") [line 26]
the wrapper around the PHP_Shell class

  • 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

require_once("PHP/Shell/Extensions/ExecutionTime.php") [line 30]
require_once("PHP/Shell/Extensions/InlineHelp.php") [line 31]

__autoload [line 99]

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 ]



__shell_default_error_handler [line 49]

void __shell_default_error_handler( 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 ]



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