Packages

  • Nette
    • Application
      • Application\Diagnostics
      • Application\Responses
      • Application\Routers
      • Application\UI
    • Caching
      • Caching\Storages
    • ComponentModel
    • Config
      • Config\Extensions
    • Database
      • Database\Diagnostics
      • Database\Drivers
      • Database\Reflection
      • Database\Table
    • DI
      • DI\Diagnostics
    • Diagnostics
    • Forms
      • Forms\Controls
      • Forms\Rendering
    • Http
    • Iterators
    • Latte
      • Latte\Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Security\Diagnostics
    • Templating
    • Utils
      • Utils\PhpGenerator
  • NetteModule
  • None
  • PHP

Classes

  • AutoLoader
  • NetteLoader
  • RobotLoader
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: 
  3: /**
  4:  * This file is part of the Nette Framework (http://nette.org)
  5:  *
  6:  * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
  7:  *
  8:  * For the full copyright and license information, please view
  9:  * the file license.txt that was distributed with this source code.
 10:  * @package Nette\Loaders
 11:  */
 12: 
 13: 
 14: 
 15: /**
 16:  * Nette auto loader is responsible for loading Nette classes and interfaces.
 17:  *
 18:  * @author     David Grudl
 19:  * @package Nette\Loaders
 20:  */
 21: class NetteLoader extends AutoLoader
 22: {
 23:     /** @var NetteLoader */
 24:     private static $instance;
 25: 
 26:     /** @var array */
 27:     public $renamed = array(
 28:         'Configurator' => 'Configurator',
 29:         'User' => 'User',
 30:         'DefaultHelpers' => 'TemplateHelpers',
 31:     );
 32: 
 33:     /** @var array */
 34:     public $list = array(
 35:         'AbortException' => '/Application/exceptions',
 36:         'Annotation' => '/Reflection/Annotation',
 37:         'AnnotationsParser' => '/Reflection/AnnotationsParser',
 38:         'AppForm' => '/Application/UI/Form',
 39:         'Application' => '/Application/Application',
 40:         'ApplicationException' => '/Application/exceptions',
 41:         'ArgumentOutOfRangeException' => '/common/exceptions',
 42:         'ArrayHash' => '/common/ArrayHash',
 43:         'ArrayList' => '/common/ArrayList',
 44:         'Arrays' => '/Utils/Arrays',
 45:         'AssertionException' => '/Utils/Validators',
 46:         'AuthenticationException' => '/Security/AuthenticationException',
 47:         'AutoLoader' => '/Loaders/AutoLoader',
 48:         'BadRequestException' => '/Application/exceptions',
 49:         'BadSignalException' => '/Application/UI/BadSignalException',
 50:         'Button' => '/Forms/Controls/Button',
 51:         'Cache' => '/Caching/Cache',
 52:         'CacheMacro' => '/Latte/Macros/CacheMacro',
 53:         'CachingHelper' => '/Caching/OutputHelper',
 54:         'Callback' => '/common/Callback',
 55:         'Checkbox' => '/Forms/Controls/Checkbox',
 56:         'ClassReflection' => '/Reflection/ClassType',
 57:         'CliRouter' => '/Application/Routers/CliRouter',
 58:         'Component' => '/ComponentModel/Component',
 59:         'ComponentContainer' => '/ComponentModel/Container',
 60:         'ConfigCompiler' => '/Config/Compiler',
 61:         'ConfigCompilerExtension' => '/Config/CompilerExtension',
 62:         'ConfigHelpers' => '/Config/Helpers',
 63:         'ConfigIniAdapter' => '/Config/Adapters/IniAdapter',
 64:         'ConfigLoader' => '/Config/Loader',
 65:         'ConfigNeonAdapter' => '/Config/Adapters/NeonAdapter',
 66:         'ConfigPhpAdapter' => '/Config/Adapters/PhpAdapter',
 67:         'Configurator' => '/Config/Configurator',
 68:         'Connection' => '/Database/Connection',
 69:         'ConstantsExtension' => '/Config/Extensions/ConstantsExtension',
 70:         'ContainerPanel' => '/DI/Diagnostics/ContainerPanel',
 71:         'Control' => '/Application/UI/Control',
 72:         'ConventionalReflection' => '/Database/Reflection/ConventionalReflection',
 73:         'CoreMacros' => '/Latte/Macros/CoreMacros',
 74:         'DIContainer' => '/DI/Container',
 75:         'DIContainerBuilder' => '/DI/ContainerBuilder',
 76:         'DIHelpers' => '/DI/Helpers',
 77:         'DINestedAccessor' => '/DI/NestedAccessor',
 78:         'DIServiceDefinition' => '/DI/ServiceDefinition',
 79:         'DIStatement' => '/DI/Statement',
 80:         'DatabaseHelpers' => '/Database/Helpers',
 81:         'DatabasePanel' => '/Database/Diagnostics/ConnectionPanel',
 82:         'DateTime53' => '/common/DateTime',
 83:         'DebugBar' => '/Diagnostics/Bar',
 84:         'DebugBlueScreen' => '/Diagnostics/BlueScreen',
 85:         'DebugHelpers' => '/Diagnostics/Helpers',
 86:         'Debugger' => '/Diagnostics/Debugger',
 87:         'DefaultBarPanel' => '/Diagnostics/DefaultBarPanel',
 88:         'DefaultFormRenderer' => '/Forms/Rendering/DefaultFormRenderer',
 89:         'DeprecatedException' => '/common/exceptions',
 90:         'DevNullStorage' => '/Caching/Storages/DevNullStorage',
 91:         'DirectoryNotFoundException' => '/common/exceptions',
 92:         'DiscoveredReflection' => '/Database/Reflection/DiscoveredReflection',
 93:         'Environment' => '/common/Environment',
 94:         'ExtensionReflection' => '/Reflection/Extension',
 95:         'FatalErrorException' => '/common/exceptions',
 96:         'FileJournal' => '/Caching/Storages/FileJournal',
 97:         'FileNotFoundException' => '/common/exceptions',
 98:         'FileResponse' => '/Application/Responses/FileResponse',
 99:         'FileStorage' => '/Caching/Storages/FileStorage',
100:         'FileTemplate' => '/Templating/FileTemplate',
101:         'Finder' => '/Utils/Finder',
102:         'FireLogger' => '/Diagnostics/FireLogger',
103:         'ForbiddenRequestException' => '/Application/exceptions',
104:         'Form' => '/Forms/Form',
105:         'FormContainer' => '/Forms/Container',
106:         'FormControl' => '/Forms/Controls/BaseControl',
107:         'FormGroup' => '/Forms/ControlGroup',
108:         'FormMacros' => '/Latte/Macros/FormMacros',
109:         'ForwardResponse' => '/Application/Responses/ForwardResponse',
110:         'Framework' => '/common/Framework',
111:         'FreezableObject' => '/common/FreezableObject',
112:         'FunctionReflection' => '/Reflection/GlobalFunction',
113:         'GenericRecursiveIterator' => '/Iterators/Recursor',
114:         'GroupedTableSelection' => '/Database/Table/GroupedSelection',
115:         'HiddenField' => '/Forms/Controls/HiddenField',
116:         'Html' => '/Utils/Html',
117:         'HtmlNode' => '/Latte/HtmlNode',
118:         'HttpContext' => '/Http/Context',
119:         'HttpRequest' => '/Http/Request',
120:         'HttpRequestFactory' => '/Http/RequestFactory',
121:         'HttpResponse' => '/Http/Response',
122:         'HttpUploadedFile' => '/Http/FileUpload',
123:         'IAnnotation' => '/Reflection/IAnnotation',
124:         'IAuthenticator' => '/Security/IAuthenticator',
125:         'IAuthorizator' => '/Security/IAuthorizator',
126:         'IBarPanel' => '/Diagnostics/IBarPanel',
127:         'ICacheJournal' => '/Caching/Storages/IJournal',
128:         'ICacheStorage' => '/Caching/IStorage',
129:         'IComponent' => '/ComponentModel/IComponent',
130:         'IComponentContainer' => '/ComponentModel/IContainer',
131:         'IConfigAdapter' => '/Config/IAdapter',
132:         'IDIContainer' => '/DI/IContainer',
133:         'IFileTemplate' => '/Templating/IFileTemplate',
134:         'IFormControl' => '/Forms/IControl',
135:         'IFormRenderer' => '/Forms/IFormRenderer',
136:         'IFreezable' => '/common/IFreezable',
137:         'IHttpRequest' => '/Http/IRequest',
138:         'IHttpResponse' => '/Http/IResponse',
139:         'IIdentity' => '/Security/IIdentity',
140:         'IMacro' => '/Latte/IMacro',
141:         'IMailer' => '/Mail/IMailer',
142:         'IOException' => '/common/exceptions',
143:         'IPresenter' => '/Application/IPresenter',
144:         'IPresenterFactory' => '/Application/IPresenterFactory',
145:         'IPresenterResponse' => '/Application/IResponse',
146:         'IReflection' => '/Database/IReflection',
147:         'IRenderable' => '/Application/UI/IRenderable',
148:         'IResource' => '/Security/IResource',
149:         'IRole' => '/Security/IRole',
150:         'IRouter' => '/Application/IRouter',
151:         'ISessionStorage' => '/Http/ISessionStorage',
152:         'ISignalReceiver' => '/Application/UI/ISignalReceiver',
153:         'IStatePersistent' => '/Application/UI/IStatePersistent',
154:         'ISubmitterControl' => '/Forms/ISubmitterControl',
155:         'ISupplementalDriver' => '/Database/ISupplementalDriver',
156:         'ITemplate' => '/Templating/ITemplate',
157:         'ITranslator' => '/Localization/ITranslator',
158:         'IUserStorage' => '/Security/IUserStorage',
159:         'Identity' => '/Security/Identity',
160:         'Image' => '/common/Image',
161:         'ImageButton' => '/Forms/Controls/ImageButton',
162:         'InstanceFilterIterator' => '/Iterators/InstanceFilter',
163:         'InvalidLinkException' => '/Application/UI/InvalidLinkException',
164:         'InvalidPresenterException' => '/Application/exceptions',
165:         'InvalidStateException' => '/common/exceptions',
166:         'Json' => '/Utils/Json',
167:         'JsonException' => '/Utils/Json',
168:         'JsonResponse' => '/Application/Responses/JsonResponse',
169:         'LatteCompiler' => '/Latte/Compiler',
170:         'LatteException' => '/Latte/ParseException',
171:         'LatteFilter' => '/Latte/Engine',
172:         'LatteToken' => '/Latte/Token',
173:         'LimitedScope' => '/Utils/LimitedScope',
174:         'Link' => '/Application/UI/Link',
175:         'Logger' => '/Diagnostics/Logger',
176:         'MacroNode' => '/Latte/MacroNode',
177:         'MacroSet' => '/Latte/Macros/MacroSet',
178:         'MacroTokenizer' => '/Latte/MacroTokenizer',
179:         'Mail' => '/Mail/Message',
180:         'MailMimePart' => '/Mail/MimePart',
181:         'MapIterator' => '/Iterators/Mapper',
182:         'MemberAccessException' => '/common/exceptions',
183:         'MemcachedStorage' => '/Caching/Storages/MemcachedStorage',
184:         'MemoryStorage' => '/Caching/Storages/MemoryStorage',
185:         'MethodReflection' => '/Reflection/Method',
186:         'MicroPresenter' => '/Application/MicroPresenter',
187:         'MimeTypeDetector' => '/Utils/MimeTypeDetector',
188:         'MissingServiceException' => '/DI/exceptions',
189:         'MsSqlDriver' => '/Database/Drivers/MsSqlDriver',
190:         'MultiSelectBox' => '/Forms/Controls/MultiSelectBox',
191:         'Multiplier' => '/Application/UI/Multiplier',
192:         'MySqlDriver' => '/Database/Drivers/MySqlDriver',
193:         'NCFix' => '/loader',
194:         'NCallbackFilterIterator' => '/Iterators/Filter',
195:         'NRecursiveCallbackFilterIterator' => '/Iterators/RecursiveFilter',
196:         'Neon' => '/Utils/Neon',
197:         'NeonEntity' => '/Utils/Neon',
198:         'NeonException' => '/Utils/Neon',
199:         'NetteExtension' => '/Config/Extensions/NetteExtension',
200:         'NetteLoader' => '/Loaders/NetteLoader',
201:         'NotImplementedException' => '/common/exceptions',
202:         'NotSupportedException' => '/common/exceptions',
203:         'Object' => '/common/Object',
204:         'ObjectMixin' => '/common/ObjectMixin',
205:         'OciDriver' => '/Database/Drivers/OciDriver',
206:         'OdbcDriver' => '/Database/Drivers/OdbcDriver',
207:         'Paginator' => '/Utils/Paginator',
208:         'ParameterReflection' => '/Reflection/Parameter',
209:         'Parser' => '/Latte/Parser',
210:         'Permission' => '/Security/Permission',
211:         'PgSqlDriver' => '/Database/Drivers/PgSqlDriver',
212:         'PhpClassType' => '/Utils/PhpGenerator/ClassType',
213:         'PhpExtension' => '/Config/Extensions/PhpExtension',
214:         'PhpFileStorage' => '/Caching/Storages/PhpFileStorage',
215:         'PhpHelpers' => '/Utils/PhpGenerator/Helpers',
216:         'PhpLiteral' => '/Utils/PhpGenerator/PhpLiteral',
217:         'PhpMethod' => '/Utils/PhpGenerator/Method',
218:         'PhpParameter' => '/Utils/PhpGenerator/Parameter',
219:         'PhpProperty' => '/Utils/PhpGenerator/Property',
220:         'PhpWriter' => '/Latte/PhpWriter',
221:         'Presenter' => '/Application/UI/Presenter',
222:         'PresenterComponent' => '/Application/UI/PresenterComponent',
223:         'PresenterComponentReflection' => '/Application/UI/PresenterComponentReflection',
224:         'PresenterFactory' => '/Application/PresenterFactory',
225:         'PresenterRequest' => '/Application/Request',
226:         'PropertyReflection' => '/Reflection/Property',
227:         'RadioList' => '/Forms/Controls/RadioList',
228:         'RecursiveComponentIterator' => '/ComponentModel/RecursiveComponentIterator',
229:         'RedirectResponse' => '/Application/Responses/RedirectResponse',
230:         'RegexpException' => '/Utils/Strings',
231:         'RobotLoader' => '/Loaders/RobotLoader',
232:         'Route' => '/Application/Routers/Route',
233:         'RouteList' => '/Application/Routers/RouteList',
234:         'RoutingDebugger' => '/Application/Diagnostics/RoutingPanel',
235:         'Row' => '/Database/Row',
236:         'Rule' => '/Forms/Rule',
237:         'Rules' => '/Forms/Rules',
238:         'SafeStream' => '/Utils/SafeStream',
239:         'SelectBox' => '/Forms/Controls/SelectBox',
240:         'SendmailMailer' => '/Mail/SendmailMailer',
241:         'ServiceCreationException' => '/DI/exceptions',
242:         'Session' => '/Http/Session',
243:         'SessionSection' => '/Http/SessionSection',
244:         'SimpleAuthenticator' => '/Security/SimpleAuthenticator',
245:         'SimpleRouter' => '/Application/Routers/SimpleRouter',
246:         'SmartCachingIterator' => '/Iterators/CachingIterator',
247:         'SmtpException' => '/Mail/SmtpMailer',
248:         'SmtpMailer' => '/Mail/SmtpMailer',
249:         'SqlLiteral' => '/Database/SqlLiteral',
250:         'SqlPreprocessor' => '/Database/SqlPreprocessor',
251:         'Sqlite2Driver' => '/Database/Drivers/Sqlite2Driver',
252:         'SqliteDriver' => '/Database/Drivers/SqliteDriver',
253:         'Statement' => '/Database/Statement',
254:         'StaticClassException' => '/common/exceptions',
255:         'Strings' => '/Utils/Strings',
256:         'SubmitButton' => '/Forms/Controls/SubmitButton',
257:         'TableRow' => '/Database/Table/ActiveRow',
258:         'TableSelection' => '/Database/Table/Selection',
259:         'Template' => '/Templating/Template',
260:         'TemplateException' => '/Templating/FilterException',
261:         'TemplateHelpers' => '/Templating/Helpers',
262:         'TextArea' => '/Forms/Controls/TextArea',
263:         'TextBase' => '/Forms/Controls/TextBase',
264:         'TextInput' => '/Forms/Controls/TextInput',
265:         'TextResponse' => '/Application/Responses/TextResponse',
266:         'Tokenizer' => '/Utils/Tokenizer',
267:         'TokenizerException' => '/Utils/Tokenizer',
268:         'UIMacros' => '/Latte/Macros/UIMacros',
269:         'UnknownImageFileException' => '/common/Image',
270:         'UploadControl' => '/Forms/Controls/UploadControl',
271:         'Url' => '/Http/Url',
272:         'UrlScript' => '/Http/UrlScript',
273:         'User' => '/Security/User',
274:         'UserPanel' => '/Security/Diagnostics/UserPanel',
275:         'UserStorage' => '/Http/UserStorage',
276:         'Validators' => '/Utils/Validators',
277:     );
278: 
279: 
280: 
281:     /**
282:      * Returns singleton instance with lazy instantiation.
283:      * @return NetteLoader
284:      */
285:     public static function getInstance()
286:     {
287:         if (self::$instance === NULL) {
288:             self::$instance = new self;
289:         }
290:         return self::$instance;
291:     }
292: 
293: 
294: 
295:     /**
296:      * Handles autoloading of classes or interfaces.
297:      * @param  string
298:      * @return void
299:      */
300:     public function tryLoad($type)
301:     {
302:         $type = ltrim($type, '\\');
303:         if (isset($this->list[$type])) {
304:             LimitedScope::load(NETTE_DIR . $this->list[$type] . '.php', TRUE);
305:             self::$count++;
306: 
307:         }}
308: 
309: }
310: 
Nette Framework 2.0beta2 (for PHP 5.2) API API documentation generated by ApiGen 2.3.0