Provides helper functions for including classes and files dynamically so that Exceptions are thrown instead of PHP errors and warnings

package verysimple::IO
author Jason Hinkle
copyright 1997-2008 VerySimple, Inc.
license LGPL
version 1.0


Handler for catching file-not-found errors and throwing an IncludeException

IncludeException($code, $string, $file, $line, $context) 







Includes a file with the given path. If PHP is unable to include the file, an IncludeException is thrown instead of a PHP warning

IncludeFile(string $path) 




path to file passed to the include_once statement

Ensures that a class is defined. If not, attempts to include the file using the provided path. If unable to locate the class, an IncludeException will be thrown. The path that will be used for include_once is $classpath . "/" . $classname . ".php"

RequireClass(string $classname, string $classpath) 




name of class (ex Phreeze)



or array [optional] the relative path(s) where the file would be found