mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- Update examples
- Update documentation - Move classes/interfaces already implemented in c to new subdir internal
This commit is contained in:
parent
26fea0bd80
commit
a6feb3f405
27 changed files with 330 additions and 205 deletions
|
@ -1,5 +1,8 @@
|
|||
<?php
|
||||
|
||||
/** \internal
|
||||
* Tries to load class $classname from directory $dir.
|
||||
*/
|
||||
function __load_class($classname, $dir)
|
||||
{
|
||||
$file = $dir . '/' . $classname . '.inc';
|
||||
|
@ -11,6 +14,14 @@ function __load_class($classname, $dir)
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Class loader for SPL example classes
|
||||
* @author Marcus Boerger
|
||||
* @version 1.0
|
||||
*
|
||||
* Loads classes automatically from include_path as given by ini or from
|
||||
* current directory of script or include file.
|
||||
*/
|
||||
function __autoload($classname) {
|
||||
$classname = strtolower($classname);
|
||||
foreach(split(':', ini_get('include_path')) as $dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue