Packages

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

Classes

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