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
  • PHP

Classes

  • NAutoLoader
  • NNetteLoader
  • NRobotLoader
  • 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 NNetteLoader extends NAutoLoader
 22: {
 23:     /** @var NNetteLoader */
 24:     private static $instance;
 25: 
 26:     /** @var array */
 27:     public $renamed = array(
 28:         'NConfigurator' => 'NConfigurator',
 29:         'NUser' => 'NUser',
 30:         'NDefaultHelpers' => 'NTemplateHelpers',
 31:         'NLatteException' => 'NCompileException',
 32:     );
 33: 
 34:     /** @var array */
 35:     public $list = array(
 36:         'ArgumentOutOfRangeException' => '/common/exceptions',
 37:         'DeprecatedException' => '/common/exceptions',
 38:         'DirectoryNotFoundException' => '/common/exceptions',
 39:         'FatalErrorException' => '/common/exceptions',
 40:         'FileNotFoundException' => '/common/exceptions',
 41:         'IAnnotation' => '/Reflection/IAnnotation',
 42:         'IAuthenticator' => '/Security/IAuthenticator',
 43:         'IAuthorizator' => '/Security/IAuthorizator',
 44:         'IBarPanel' => '/Diagnostics/IBarPanel',
 45:         'ICacheJournal' => '/Caching/Storages/IJournal',
 46:         'ICacheStorage' => '/Caching/IStorage',
 47:         'IComponent' => '/ComponentModel/IComponent',
 48:         'IComponentContainer' => '/ComponentModel/IContainer',
 49:         'IConfigAdapter' => '/Config/IAdapter',
 50:         'IDIContainer' => '/DI/IContainer',
 51:         'IFileTemplate' => '/Templating/IFileTemplate',
 52:         'IFormControl' => '/Forms/IControl',
 53:         'IFormRenderer' => '/Forms/IFormRenderer',
 54:         'IFreezable' => '/common/IFreezable',
 55:         'IHttpRequest' => '/Http/IRequest',
 56:         'IHttpResponse' => '/Http/IResponse',
 57:         'IIdentity' => '/Security/IIdentity',
 58:         'IMacro' => '/Latte/IMacro',
 59:         'IMailer' => '/Mail/IMailer',
 60:         'IOException' => '/common/exceptions',
 61:         'IPresenter' => '/Application/IPresenter',
 62:         'IPresenterFactory' => '/Application/IPresenterFactory',
 63:         'IPresenterResponse' => '/Application/IResponse',
 64:         'IReflection' => '/Database/IReflection',
 65:         'IRenderable' => '/Application/UI/IRenderable',
 66:         'IResource' => '/Security/IResource',
 67:         'IRole' => '/Security/IRole',
 68:         'IRouter' => '/Application/IRouter',
 69:         'ISessionStorage' => '/Http/ISessionStorage',
 70:         'ISignalReceiver' => '/Application/UI/ISignalReceiver',
 71:         'IStatePersistent' => '/Application/UI/IStatePersistent',
 72:         'ISubmitterControl' => '/Forms/ISubmitterControl',
 73:         'ISupplementalDriver' => '/Database/ISupplementalDriver',
 74:         'ITemplate' => '/Templating/ITemplate',
 75:         'ITranslator' => '/Localization/ITranslator',
 76:         'IUserStorage' => '/Security/IUserStorage',
 77:         'InvalidStateException' => '/common/exceptions',
 78:         'MemberAccessException' => '/common/exceptions',
 79:         'MicroPresenter' => '/Application/MicroPresenter',
 80:         'NAbortException' => '/Application/exceptions',
 81:         'NAnnotation' => '/Reflection/Annotation',
 82:         'NAnnotationsParser' => '/Reflection/AnnotationsParser',
 83:         'NAppForm' => '/Application/UI/Form',
 84:         'NApplication' => '/Application/Application',
 85:         'NApplicationException' => '/Application/exceptions',
 86:         'NArrayHash' => '/common/ArrayHash',
 87:         'NArrayList' => '/common/ArrayList',
 88:         'NArrays' => '/Utils/Arrays',
 89:         'NAssertionException' => '/Utils/Validators',
 90:         'NAuthenticationException' => '/Security/AuthenticationException',
 91:         'NAutoLoader' => '/Loaders/AutoLoader',
 92:         'NBadRequestException' => '/Application/exceptions',
 93:         'NBadSignalException' => '/Application/UI/BadSignalException',
 94:         'NButton' => '/Forms/Controls/Button',
 95:         'NCFix' => '/loader',
 96:         'NCache' => '/Caching/Cache',
 97:         'NCacheMacro' => '/Latte/Macros/CacheMacro',
 98:         'NCachingHelper' => '/Caching/OutputHelper',
 99:         'NCallback' => '/common/Callback',
100:         'NCheckbox' => '/Forms/Controls/Checkbox',
101:         'NClassReflection' => '/Reflection/ClassType',
102:         'NCliRouter' => '/Application/Routers/CliRouter',
103:         'NCompileException' => '/Latte/exceptions',
104:         'NComponent' => '/ComponentModel/Component',
105:         'NComponentContainer' => '/ComponentModel/Container',
106:         'NConfigCompiler' => '/Config/Compiler',
107:         'NConfigCompilerExtension' => '/Config/CompilerExtension',
108:         'NConfigHelpers' => '/Config/Helpers',
109:         'NConfigIniAdapter' => '/Config/Adapters/IniAdapter',
110:         'NConfigLoader' => '/Config/Loader',
111:         'NConfigNeonAdapter' => '/Config/Adapters/NeonAdapter',
112:         'NConfigPhpAdapter' => '/Config/Adapters/PhpAdapter',
113:         'NConfigurator' => '/Config/Configurator',
114:         'NConnection' => '/Database/Connection',
115:         'NConstantsExtension' => '/Config/Extensions/ConstantsExtension',
116:         'NContainerPanel' => '/DI/Diagnostics/ContainerPanel',
117:         'NControl' => '/Application/UI/Control',
118:         'NConventionalReflection' => '/Database/Reflection/ConventionalReflection',
119:         'NCoreMacros' => '/Latte/Macros/CoreMacros',
120:         'NDIContainer' => '/DI/Container',
121:         'NDIContainerBuilder' => '/DI/ContainerBuilder',
122:         'NDIHelpers' => '/DI/Helpers',
123:         'NDINestedAccessor' => '/DI/NestedAccessor',
124:         'NDIServiceDefinition' => '/DI/ServiceDefinition',
125:         'NDIStatement' => '/DI/Statement',
126:         'NDatabaseHelpers' => '/Database/Helpers',
127:         'NDatabasePanel' => '/Database/Diagnostics/ConnectionPanel',
128:         'NDateTime53' => '/common/DateTime',
129:         'NDebugBar' => '/Diagnostics/Bar',
130:         'NDebugBlueScreen' => '/Diagnostics/BlueScreen',
131:         'NDebugHelpers' => '/Diagnostics/Helpers',
132:         'NDebugger' => '/Diagnostics/Debugger',
133:         'NDefaultBarPanel' => '/Diagnostics/DefaultBarPanel',
134:         'NDefaultFormRenderer' => '/Forms/Rendering/DefaultFormRenderer',
135:         'NDevNullStorage' => '/Caching/Storages/DevNullStorage',
136:         'NDiscoveredReflection' => '/Database/Reflection/DiscoveredReflection',
137:         'NEnvironment' => '/common/Environment',
138:         'NExtensionReflection' => '/Reflection/Extension',
139:         'NFileJournal' => '/Caching/Storages/FileJournal',
140:         'NFileResponse' => '/Application/Responses/FileResponse',
141:         'NFileStorage' => '/Caching/Storages/FileStorage',
142:         'NFileTemplate' => '/Templating/FileTemplate',
143:         'NFinder' => '/Utils/Finder',
144:         'NFireLogger' => '/Diagnostics/FireLogger',
145:         'NForbiddenRequestException' => '/Application/exceptions',
146:         'NForm' => '/Forms/Form',
147:         'NFormContainer' => '/Forms/Container',
148:         'NFormControl' => '/Forms/Controls/BaseControl',
149:         'NFormGroup' => '/Forms/ControlGroup',
150:         'NFormMacros' => '/Latte/Macros/FormMacros',
151:         'NForwardResponse' => '/Application/Responses/ForwardResponse',
152:         'NFramework' => '/common/Framework',
153:         'NFreezableObject' => '/common/FreezableObject',
154:         'NFunctionReflection' => '/Reflection/GlobalFunction',
155:         'NGenericRecursiveIterator' => '/Iterators/Recursor',
156:         'NGroupedTableSelection' => '/Database/Table/GroupedSelection',
157:         'NHiddenField' => '/Forms/Controls/HiddenField',
158:         'NHtml' => '/Utils/Html',
159:         'NHtmlNode' => '/Latte/HtmlNode',
160:         'NHttpContext' => '/Http/Context',
161:         'NHttpRequest' => '/Http/Request',
162:         'NHttpRequestFactory' => '/Http/RequestFactory',
163:         'NHttpResponse' => '/Http/Response',
164:         'NHttpUploadedFile' => '/Http/FileUpload',
165:         'NIdentity' => '/Security/Identity',
166:         'NImage' => '/common/Image',
167:         'NImageButton' => '/Forms/Controls/ImageButton',
168:         'NInstanceFilterIterator' => '/Iterators/InstanceFilter',
169:         'NInvalidLinkException' => '/Application/UI/InvalidLinkException',
170:         'NInvalidPresenterException' => '/Application/exceptions',
171:         'NJson' => '/Utils/Json',
172:         'NJsonException' => '/Utils/Json',
173:         'NJsonResponse' => '/Application/Responses/JsonResponse',
174:         'NLatteCompiler' => '/Latte/Compiler',
175:         'NLatteFilter' => '/Latte/Engine',
176:         'NLatteToken' => '/Latte/Token',
177:         'NLimitedScope' => '/Utils/LimitedScope',
178:         'NLink' => '/Application/UI/Link',
179:         'NLogger' => '/Diagnostics/Logger',
180:         'NMacroNode' => '/Latte/MacroNode',
181:         'NMacroSet' => '/Latte/Macros/MacroSet',
182:         'NMacroTokenizer' => '/Latte/MacroTokenizer',
183:         'NMail' => '/Mail/Message',
184:         'NMailMimePart' => '/Mail/MimePart',
185:         'NMapIterator' => '/Iterators/Mapper',
186:         'NMemcachedStorage' => '/Caching/Storages/MemcachedStorage',
187:         'NMemoryStorage' => '/Caching/Storages/MemoryStorage',
188:         'NMethodReflection' => '/Reflection/Method',
189:         'NMimeTypeDetector' => '/Utils/MimeTypeDetector',
190:         'NMissingServiceException' => '/DI/exceptions',
191:         'NMsSqlDriver' => '/Database/Drivers/MsSqlDriver',
192:         'NMultiSelectBox' => '/Forms/Controls/MultiSelectBox',
193:         'NMultiplier' => '/Application/UI/Multiplier',
194:         'NMySqlDriver' => '/Database/Drivers/MySqlDriver',
195:         'NNCallbackFilterIterator' => '/Iterators/Filter',
196:         'NNRecursiveCallbackFilterIterator' => '/Iterators/RecursiveFilter',
197:         'NNeon' => '/Utils/Neon',
198:         'NNeonEntity' => '/Utils/Neon',
199:         'NNeonException' => '/Utils/Neon',
200:         'NNetteExtension' => '/Config/Extensions/NetteExtension',
201:         'NNetteLoader' => '/Loaders/NetteLoader',
202:         'NObject' => '/common/Object',
203:         'NObjectMixin' => '/common/ObjectMixin',
204:         'NOciDriver' => '/Database/Drivers/OciDriver',
205:         'NOdbcDriver' => '/Database/Drivers/OdbcDriver',
206:         'NPaginator' => '/Utils/Paginator',
207:         'NParameterReflection' => '/Reflection/Parameter',
208:         'NParser' => '/Latte/Parser',
209:         'NPermission' => '/Security/Permission',
210:         'NPgSqlDriver' => '/Database/Drivers/PgSqlDriver',
211:         'NPhpClassType' => '/Utils/PhpGenerator/ClassType',
212:         'NPhpExtension' => '/Config/Extensions/PhpExtension',
213:         'NPhpFileStorage' => '/Caching/Storages/PhpFileStorage',
214:         'NPhpHelpers' => '/Utils/PhpGenerator/Helpers',
215:         'NPhpLiteral' => '/Utils/PhpGenerator/PhpLiteral',
216:         'NPhpMethod' => '/Utils/PhpGenerator/Method',
217:         'NPhpParameter' => '/Utils/PhpGenerator/Parameter',
218:         'NPhpProperty' => '/Utils/PhpGenerator/Property',
219:         'NPhpWriter' => '/Latte/PhpWriter',
220:         'NPresenter' => '/Application/UI/Presenter',
221:         'NPresenterComponent' => '/Application/UI/PresenterComponent',
222:         'NPresenterComponentReflection' => '/Application/UI/PresenterComponentReflection',
223:         'NPresenterFactory' => '/Application/PresenterFactory',
224:         'NPresenterRequest' => '/Application/Request',
225:         'NPropertyReflection' => '/Reflection/Property',
226:         'NRadioList' => '/Forms/Controls/RadioList',
227:         'NRecursiveComponentIterator' => '/ComponentModel/RecursiveComponentIterator',
228:         'NRedirectResponse' => '/Application/Responses/RedirectResponse',
229:         'NRegexpException' => '/Utils/Strings',
230:         'NRobotLoader' => '/Loaders/RobotLoader',
231:         'NRoute' => '/Application/Routers/Route',
232:         'NRouteList' => '/Application/Routers/RouteList',
233:         'NRoutingDebugger' => '/Application/Diagnostics/RoutingPanel',
234:         'NRow' => '/Database/Row',
235:         'NRule' => '/Forms/Rule',
236:         'NRules' => '/Forms/Rules',
237:         'NSafeStream' => '/Utils/SafeStream',
238:         'NSelectBox' => '/Forms/Controls/SelectBox',
239:         'NSendmailMailer' => '/Mail/SendmailMailer',
240:         'NServiceCreationException' => '/DI/exceptions',
241:         'NSession' => '/Http/Session',
242:         'NSessionSection' => '/Http/SessionSection',
243:         'NSimpleAuthenticator' => '/Security/SimpleAuthenticator',
244:         'NSimpleRouter' => '/Application/Routers/SimpleRouter',
245:         'NSmartCachingIterator' => '/Iterators/CachingIterator',
246:         'NSmtpException' => '/Mail/SmtpMailer',
247:         'NSmtpMailer' => '/Mail/SmtpMailer',
248:         'NSqlBuilder' => '/Database/Table/SqlBuilder',
249:         'NSqlLiteral' => '/Database/SqlLiteral',
250:         'NSqlPreprocessor' => '/Database/SqlPreprocessor',
251:         'NSqlite2Driver' => '/Database/Drivers/Sqlite2Driver',
252:         'NSqliteDriver' => '/Database/Drivers/SqliteDriver',
253:         'NStatement' => '/Database/Statement',
254:         'NStaticClassException' => '/common/exceptions',
255:         'NStrings' => '/Utils/Strings',
256:         'NSubmitButton' => '/Forms/Controls/SubmitButton',
257:         'NTableRow' => '/Database/Table/ActiveRow',
258:         'NTableSelection' => '/Database/Table/Selection',
259:         'NTemplate' => '/Templating/Template',
260:         'NTemplateException' => '/Templating/FilterException',
261:         'NTemplateHelpers' => '/Templating/Helpers',
262:         'NTextArea' => '/Forms/Controls/TextArea',
263:         'NTextBase' => '/Forms/Controls/TextBase',
264:         'NTextInput' => '/Forms/Controls/TextInput',
265:         'NTextResponse' => '/Application/Responses/TextResponse',
266:         'NTokenizer' => '/Utils/Tokenizer',
267:         'NTokenizerException' => '/Utils/Tokenizer',
268:         'NUIMacros' => '/Latte/Macros/UIMacros',
269:         'NUnknownImageFileException' => '/common/Image',
270:         'NUploadControl' => '/Forms/Controls/UploadControl',
271:         'NUrl' => '/Http/Url',
272:         'NUrlScript' => '/Http/UrlScript',
273:         'NUser' => '/Security/User',
274:         'NUserPanel' => '/Security/Diagnostics/UserPanel',
275:         'NUserStorage' => '/Http/UserStorage',
276:         'NValidators' => '/Utils/Validators',
277:         'NotImplementedException' => '/common/exceptions',
278:         'NotSupportedException' => '/common/exceptions',
279:     );
280: 
281: 
282: 
283:     /**
284:      * Returns singleton instance with lazy instantiation.
285:      * @return NNetteLoader
286:      */
287:     public static function getInstance()
288:     {
289:         if (self::$instance === NULL) {
290:             self::$instance = new self;
291:         }
292:         return self::$instance;
293:     }
294: 
295: 
296: 
297:     /**
298:      * Handles autoloading of classes or interfaces.
299:      * @param  string
300:      * @return void
301:      */
302:     public function tryLoad($type)
303:     {
304:         $type = ltrim($type, '\\');
305:         if (isset($this->list[$type])) {
306:             NLimitedScope::load(NETTE_DIR . $this->list[$type] . '.php', TRUE);
307:             self::$count++;
308: 
309:         }}
310: 
311: }
312: 
Nette Framework 2.0.6 (for PHP 5.2, prefixed) API API documentation generated by ApiGen 2.7.0