Subversion Repositories Applications.gtt

Rev

Rev 94 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 187
Line 1... Line 1...
1
<?php
1
<?php
2
/**
2
/**
3
 * Class auto-loader
3
 * Class auto-loader
4
 *
4
 *
5
 * PHP versions 4
5
 * PHP versions 4
6
 *
6
 
7
 * LICENSE: This source file is subject to version 3.0 of the PHP license
-
 
8
 * that is available through the world-wide-web at the following URI:
-
 
9
 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
-
 
10
 * the PHP License and are unable to obtain it through the web, please
-
 
11
 * send a note to license@php.net so we can mail you a copy immediately.
-
 
12
 *
7
 *
13
 * @category   pear
8
 * @category   pear
14
 * @package    PEAR
9
 * @package    PEAR
15
 * @author     Stig Bakken <ssb@php.net>
10
 * @author     Stig Bakken <ssb@php.net>
16
 * @copyright  1997-2006 The PHP Group
11
 * @copyright  1997-2009 The Authors
17
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
12
 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
18
 * @version    CVS: $Id: Autoloader.php,v 1.13 2006/01/06 04:47:36 cellog Exp $
-
 
19
 * @link       http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
13
 * @link       http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
20
 * @since      File available since Release 0.1
14
 * @since      File available since Release 0.1
21
 * @deprecated File deprecated in Release 1.4.0a1
15
 * @deprecated File deprecated in Release 1.4.0a1
22
 */
16
 */
Line 46... Line 40...
46
 * stored and called every time the aggregated method is called.
40
 * stored and called every time the aggregated method is called.
47
 *
41
 *
48
 * @category   pear
42
 * @category   pear
49
 * @package    PEAR
43
 * @package    PEAR
50
 * @author Stig Bakken <ssb@php.net>
44
 * @author Stig Bakken <ssb@php.net>
51
 * @copyright  1997-2006 The PHP Group
45
 * @copyright  1997-2009 The Authors
52
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
46
 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
53
 * @version    Release: 1.5.1
47
 * @version    Release: 1.10.1
54
 * @link       http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
48
 * @link       http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
55
 * @since      File available since Release 0.1
49
 * @since      File available since Release 0.1
56
 * @deprecated File deprecated in Release 1.4.0a1
50
 * @deprecated File deprecated in Release 1.4.0a1
57
 */
51
 */
58
class PEAR_Autoloader extends PEAR
52
class PEAR_Autoloader extends PEAR
Line 147... Line 141...
147
        $classname = strtolower($classname);
141
        $classname = strtolower($classname);
148
        if (!class_exists($classname)) {
142
        if (!class_exists($classname)) {
149
            $include_file = preg_replace('/[^a-z0-9]/i', '_', $classname);
143
            $include_file = preg_replace('/[^a-z0-9]/i', '_', $classname);
150
            include_once $include_file;
144
            include_once $include_file;
151
        }
145
        }
152
        $obj =& new $classname;
146
        $obj = new $classname;
153
        $methods = get_class_methods($classname);
147
        $methods = get_class_methods($classname);
154
        foreach ($methods as $method) {
148
        foreach ($methods as $method) {
155
            // don't import priviate methods and constructors
149
            // don't import priviate methods and constructors
156
            if ($method{0} != '_' && $method != $classname) {
150
            if ($method{0} != '_' && $method != $classname) {
157
                $this->_method_map[$method] = $obj;
151
                $this->_method_map[$method] = $obj;