Class autoloading package. This package provides class autoloading, and also makes aware PHPLint that class autoloading is enabled and how to fetch the required classes. The PHPLint reference manual explains in more details how the class autoloading mechanism works and when class autoloading is triggered by PHPLint and by PHP. This file should be located in the base directory of the libraries tree. In turn, every library should then import this package using something like:
require_once __DIR__ . "/../../../autoload.php";Note that we must use the special constant __DIR__ because at runtime the current working directory is set by the client package (that is, the original PHP program that was started first) and might not be the directory of the library itself. Another feature of this package is that it verify that the correct PHP configuration file be loaded. The php.ini file MUST be located in the same directory of this package. If not found there, the program exits with die().
SRC_BASE_DIR = "/home/www.icosaedro.it/phplint/stdlib"
Base directory of all the libraries, that is the directory of this package. Actually, the value is set dynamically at runtime, so there is no need to set this for every specific environment. Client packages may then use this constant to load other packages from the library that provide only constants and functions or classes that does not require the autoload mechanism:
require_once __DIR__ . "/../../../autoload.php"; require_once SRC_BASE_DIR . "/errors.php"; require_once SRC_BASE_DIR . "/it/icosaedro/bignumbers/BigFloat.php"; require_once SRC_BASE_DIR . "/com/acme/web/SessionHandlingFuncs.php"; require_once SRC_BASE_DIR . "/com/acme/db/OurDBConnectionParams.php";
void phplint_autoload(string $className) throws AutoloadException
Performs class autoloading. Uses 'schema1' and search for the
class in the same directory where this package resides,
adding ".php" at the end of the string.
This function is intended to be called automatically by the PHP
interpreter, and should never be called explicitly from user code.
$className - Fully qualified class name.
AutoloadException - If the class file cannot be found or
cannot be read.
int phplint_count(mixed $a)
Returns the number of elements in the array. At least up to PHP 7.1
count(NULL) gives 0, but it triggers E_WARNING as of PHP 7.2. Most of
the PHPLint stdlib relies on the first behavior in order to save some memory
space for empty arrays, so the need for this replacement.
PHP Version: 7
Generated by PHPLint Documentator