-
-
Notifications
You must be signed in to change notification settings - Fork 235
/
SimpleLoader.php
49 lines (39 loc) 路 947 Bytes
/
SimpleLoader.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* Nette Framework
*
* @copyright Copyright (c) 2004, 2010 David Grudl
* @license http://nettephp.com/license Nette license
* @link http://nettephp.com
* @category Nette
* @package Nette\Loaders
*/
/*namespace Nette\Loaders;*/
/**
* Auto loader is responsible for loading classes and interfaces.
*
* @copyright Copyright (c) 2004, 2010 David Grudl
* @package Nette\Loaders
*/
class SimpleLoader extends AutoLoader
{
/**
* Handles autoloading of classes or interfaces.
* @param string
* @return void
*/
public function tryLoad($type)
{
if (strpbrk($type, './;|') !== FALSE) {
throw new /*\*/InvalidArgumentException("Invalid class/interface name '$type'.");
}
$file = strtr($type, '\\', '/') . '.php';
/*
if (strncmp($type, 'Nette\\', 6) === 0) {
$file = dirname(dirname(dirname(__FILE__))) . '/' . $file;
}
*/
@LimitedScope::load($file);
self::$count++;
}
}