1: <?php
2:
3: 4: 5: 6: 7: 8: 9: 10: 11:
12:
13:
14:
15: 16: 17: 18: 19: 20:
21: class NNetteLoader extends NAutoLoader
22: {
23:
24: private static $instance;
25:
26:
27: public $list = array(
28: 'argumentoutofrangeexception' => '/common/exceptions.php',
29: 'deprecatedexception' => '/common/exceptions.php',
30: 'directorynotfoundexception' => '/common/exceptions.php',
31: 'fatalerrorexception' => '/common/exceptions.php',
32: 'filenotfoundexception' => '/common/exceptions.php',
33: 'iannotation' => '/Reflection/IAnnotation.php',
34: 'iauthenticator' => '/Security/IAuthenticator.php',
35: 'iauthorizator' => '/Security/IAuthorizator.php',
36: 'ibarpanel' => '/Diagnostics/IBarPanel.php',
37: 'icachejournal' => '/Caching/Storages/IJournal.php',
38: 'icachestorage' => '/Caching/IStorage.php',
39: 'icomponent' => '/ComponentModel/IComponent.php',
40: 'icomponentcontainer' => '/ComponentModel/IContainer.php',
41: 'iconfigadapter' => '/Config/IAdapter.php',
42: 'idicontainer' => '/DI/IContainer.php',
43: 'ifiletemplate' => '/Templating/IFileTemplate.php',
44: 'iformcontrol' => '/Forms/IControl.php',
45: 'iformrenderer' => '/Forms/IFormRenderer.php',
46: 'ifreezable' => '/common/IFreezable.php',
47: 'ihttprequest' => '/Http/IRequest.php',
48: 'ihttpresponse' => '/Http/IResponse.php',
49: 'iidentity' => '/Security/IIdentity.php',
50: 'imacro' => '/Latte/IMacro.php',
51: 'imailer' => '/Mail/IMailer.php',
52: 'invalidstateexception' => '/common/exceptions.php',
53: 'ioexception' => '/common/exceptions.php',
54: 'ipartiallyrenderable' => '/Application/UI/IPartiallyRenderable.php',
55: 'ipresenter' => '/Application/IPresenter.php',
56: 'ipresenterfactory' => '/Application/IPresenterFactory.php',
57: 'ipresenterresponse' => '/Application/IResponse.php',
58: 'irenderable' => '/Application/UI/IRenderable.php',
59: 'iresource' => '/Security/IResource.php',
60: 'irole' => '/Security/IRole.php',
61: 'irouter' => '/Application/IRouter.php',
62: 'iservicebuilder' => '/DI/IServiceBuilder.php',
63: 'isessionstorage' => '/Http/ISessionStorage.php',
64: 'isignalreceiver' => '/Application/UI/ISignalReceiver.php',
65: 'istatepersistent' => '/Application/UI/IStatePersistent.php',
66: 'isubmittercontrol' => '/Forms/ISubmitterControl.php',
67: 'isupplementaldriver' => '/Database/ISupplementalDriver.php',
68: 'itemplate' => '/Templating/ITemplate.php',
69: 'itranslator' => '/Localization/ITranslator.php',
70: 'iuser' => '/Http/IUser.php',
71: 'memberaccessexception' => '/common/exceptions.php',
72: 'micropresenter' => '/Application/MicroPresenter.php',
73: 'nabortexception' => '/Application/exceptions.php',
74: 'nambiguousserviceexception' => '/DI/exceptions.php',
75: 'nannotation' => '/Reflection/Annotation.php',
76: 'nannotationsparser' => '/Reflection/AnnotationsParser.php',
77: 'nappform' => '/Application/UI/Form.php',
78: 'napplication' => '/Application/Application.php',
79: 'napplicationexception' => '/Application/exceptions.php',
80: 'narrayhash' => '/common/ArrayHash.php',
81: 'narraylist' => '/common/ArrayList.php',
82: 'narrays' => '/Utils/Arrays.php',
83: 'nauthenticationexception' => '/Security/AuthenticationException.php',
84: 'nautoloader' => '/Loaders/AutoLoader.php',
85: 'nbadrequestexception' => '/Application/exceptions.php',
86: 'nbadsignalexception' => '/Application/UI/BadSignalException.php',
87: 'nbutton' => '/Forms/Controls/Button.php',
88: 'ncache' => '/Caching/Cache.php',
89: 'ncachemacro' => '/Latte/Macros/CacheMacro.php',
90: 'ncachinghelper' => '/Caching/OutputHelper.php',
91: 'ncallback' => '/common/Callback.php',
92: 'ncfix' => '/loader.php',
93: 'ncheckbox' => '/Forms/Controls/Checkbox.php',
94: 'nclassreflection' => '/Reflection/ClassType.php',
95: 'nclirouter' => '/Application/Routers/CliRouter.php',
96: 'ncomponent' => '/ComponentModel/Component.php',
97: 'ncomponentcontainer' => '/ComponentModel/Container.php',
98: 'nconfig' => '/Config/Config.php',
99: 'nconfigurator' => '/common/Configurator.php',
100: 'nconnection' => '/Database/Connection.php',
101: 'ncontrol' => '/Application/UI/Control.php',
102: 'ncoremacros' => '/Latte/Macros/CoreMacros.php',
103: 'ncriticalsection' => '/Utils/CriticalSection.php',
104: 'ndatabasepanel' => '/Database/Diagnostics/ConnectionPanel.php',
105: 'ndatabasereflection' => '/Database/Reflection/DatabaseReflection.php',
106: 'ndatetime53' => '/common/DateTime.php',
107: 'ndebugbar' => '/Diagnostics/Bar.php',
108: 'ndebugbluescreen' => '/Diagnostics/BlueScreen.php',
109: 'ndebugger' => '/Diagnostics/Debugger.php',
110: 'ndebughelpers' => '/Diagnostics/Helpers.php',
111: 'ndefaultbarpanel' => '/Diagnostics/DefaultBarPanel.php',
112: 'ndefaultformrenderer' => '/Forms/Rendering/DefaultFormRenderer.php',
113: 'ndevnullstorage' => '/Caching/Storages/DevNullStorage.php',
114: 'ndicontainer' => '/DI/Container.php',
115: 'ndicontainerbuilder' => '/DI/ContainerBuilder.php',
116: 'nenvironment' => '/common/Environment.php',
117: 'nextensionreflection' => '/Reflection/Extension.php',
118: 'nfilejournal' => '/Caching/Storages/FileJournal.php',
119: 'nfileresponse' => '/Application/Responses/FileResponse.php',
120: 'nfilestorage' => '/Caching/Storages/FileStorage.php',
121: 'nfiletemplate' => '/Templating/FileTemplate.php',
122: 'nfinder' => '/Utils/Finder.php',
123: 'nfirelogger' => '/Diagnostics/FireLogger.php',
124: 'nforbiddenrequestexception' => '/Application/exceptions.php',
125: 'nform' => '/Forms/Form.php',
126: 'nformcontainer' => '/Forms/Container.php',
127: 'nformcontrol' => '/Forms/Controls/BaseControl.php',
128: 'nformgroup' => '/Forms/ControlGroup.php',
129: 'nformmacros' => '/Latte/Macros/FormMacros.php',
130: 'nforwardresponse' => '/Application/Responses/ForwardResponse.php',
131: 'nframework' => '/common/Framework.php',
132: 'nfreezableobject' => '/common/FreezableObject.php',
133: 'nfunctionreflection' => '/Reflection/GlobalFunction.php',
134: 'ngenericrecursiveiterator' => '/Iterators/Recursor.php',
135: 'ngroupedtableselection' => '/Database/Table/GroupedSelection.php',
136: 'nhiddenfield' => '/Forms/Controls/HiddenField.php',
137: 'nhtml' => '/Utils/Html.php',
138: 'nhtmlnode' => '/Latte/HtmlNode.php',
139: 'nhttpcontext' => '/Http/Context.php',
140: 'nhttprequest' => '/Http/Request.php',
141: 'nhttprequestfactory' => '/Http/RequestFactory.php',
142: 'nhttpresponse' => '/Http/Response.php',
143: 'nhttpuploadedfile' => '/Http/FileUpload.php',
144: 'nidentity' => '/Security/Identity.php',
145: 'nimage' => '/common/Image.php',
146: 'nimagebutton' => '/Forms/Controls/ImageButton.php',
147: 'niniadapter' => '/Config/IniAdapter.php',
148: 'ninstancefilteriterator' => '/Iterators/InstanceFilter.php',
149: 'ninvalidlinkexception' => '/Application/UI/InvalidLinkException.php',
150: 'ninvalidpresenterexception' => '/Application/exceptions.php',
151: 'njson' => '/Utils/Json.php',
152: 'njsonexception' => '/Utils/Json.php',
153: 'njsonresponse' => '/Application/Responses/JsonResponse.php',
154: 'nlatteexception' => '/Latte/ParseException.php',
155: 'nlattefilter' => '/Latte/Engine.php',
156: 'nlimitedscope' => '/Utils/LimitedScope.php',
157: 'nlink' => '/Application/UI/Link.php',
158: 'nlogger' => '/Diagnostics/Logger.php',
159: 'nmacronode' => '/Latte/MacroNode.php',
160: 'nmacroset' => '/Latte/Macros/MacroSet.php',
161: 'nmacrotokenizer' => '/Latte/MacroTokenizer.php',
162: 'nmail' => '/Mail/Message.php',
163: 'nmailmimepart' => '/Mail/MimePart.php',
164: 'nmapiterator' => '/Iterators/Mapper.php',
165: 'nmemcachedstorage' => '/Caching/Storages/MemcachedStorage.php',
166: 'nmemorystorage' => '/Caching/Storages/MemoryStorage.php',
167: 'nmethodreflection' => '/Reflection/Method.php',
168: 'nmimetypedetector' => '/Utils/MimeTypeDetector.php',
169: 'nmissingserviceexception' => '/DI/exceptions.php',
170: 'nmssqldriver' => '/Database/Drivers/MsSqlDriver.php',
171: 'nmultiselectbox' => '/Forms/Controls/MultiSelectBox.php',
172: 'nmysqldriver' => '/Database/Drivers/MySqlDriver.php',
173: 'nncallbackfilteriterator' => '/Iterators/Filter.php',
174: 'nneon' => '/Utils/Neon.php',
175: 'nneonadapter' => '/Config/NeonAdapter.php',
176: 'nneonexception' => '/Utils/Neon.php',
177: 'nnetteloader' => '/Loaders/NetteLoader.php',
178: 'nnrecursivecallbackfilteriterator' => '/Iterators/RecursiveFilter.php',
179: 'nobject' => '/common/Object.php',
180: 'nobjectmixin' => '/common/ObjectMixin.php',
181: 'nocidriver' => '/Database/Drivers/OciDriver.php',
182: 'nodbcdriver' => '/Database/Drivers/OdbcDriver.php',
183: 'notimplementedexception' => '/common/exceptions.php',
184: 'notsupportedexception' => '/common/exceptions.php',
185: 'npaginator' => '/Utils/Paginator.php',
186: 'nparameterreflection' => '/Reflection/Parameter.php',
187: 'nparser' => '/Latte/Parser.php',
188: 'npermission' => '/Security/Permission.php',
189: 'npgsqldriver' => '/Database/Drivers/PgSqlDriver.php',
190: 'nphpfilestorage' => '/Caching/Storages/PhpFileStorage.php',
191: 'nphpwriter' => '/Latte/PhpWriter.php',
192: 'npresenter' => '/Application/UI/Presenter.php',
193: 'npresentercomponent' => '/Application/UI/PresenterComponent.php',
194: 'npresentercomponentreflection' => '/Application/UI/PresenterComponentReflection.php',
195: 'npresenterfactory' => '/Application/PresenterFactory.php',
196: 'npresenterrequest' => '/Application/Request.php',
197: 'npropertyreflection' => '/Reflection/Property.php',
198: 'nradiolist' => '/Forms/Controls/RadioList.php',
199: 'nrecursivecomponentiterator' => '/ComponentModel/RecursiveComponentIterator.php',
200: 'nredirectresponse' => '/Application/Responses/RedirectResponse.php',
201: 'nregexpexception' => '/Utils/Strings.php',
202: 'nrobotloader' => '/Loaders/RobotLoader.php',
203: 'nroute' => '/Application/Routers/Route.php',
204: 'nroutelist' => '/Application/Routers/RouteList.php',
205: 'nroutingdebugger' => '/Application/Diagnostics/RoutingPanel.php',
206: 'nrow' => '/Database/Row.php',
207: 'nrule' => '/Forms/Rule.php',
208: 'nrules' => '/Forms/Rules.php',
209: 'nsafestream' => '/Utils/SafeStream.php',
210: 'nselectbox' => '/Forms/Controls/SelectBox.php',
211: 'nsendmailmailer' => '/Mail/SendmailMailer.php',
212: 'nservicebuilder' => '/DI/ServiceBuilder.php',
213: 'nsession' => '/Http/Session.php',
214: 'nsessionsection' => '/Http/SessionSection.php',
215: 'nsimpleauthenticator' => '/Security/SimpleAuthenticator.php',
216: 'nsimplerouter' => '/Application/Routers/SimpleRouter.php',
217: 'nsmartcachingiterator' => '/Iterators/CachingIterator.php',
218: 'nsmtpexception' => '/Mail/SmtpMailer.php',
219: 'nsmtpmailer' => '/Mail/SmtpMailer.php',
220: 'nsqlite2driver' => '/Database/Drivers/Sqlite2Driver.php',
221: 'nsqlitedriver' => '/Database/Drivers/SqliteDriver.php',
222: 'nsqlliteral' => '/Database/SqlLiteral.php',
223: 'nsqlpreprocessor' => '/Database/SqlPreprocessor.php',
224: 'nstatement' => '/Database/Statement.php',
225: 'nstaticclassexception' => '/common/exceptions.php',
226: 'nstrings' => '/Utils/Strings.php',
227: 'nsubmitbutton' => '/Forms/Controls/SubmitButton.php',
228: 'ntablerow' => '/Database/Table/ActiveRow.php',
229: 'ntableselection' => '/Database/Table/Selection.php',
230: 'ntemplate' => '/Templating/Template.php',
231: 'ntemplateexception' => '/Templating/FilterException.php',
232: 'ntemplatehelpers' => '/Templating/DefaultHelpers.php',
233: 'ntextarea' => '/Forms/Controls/TextArea.php',
234: 'ntextbase' => '/Forms/Controls/TextBase.php',
235: 'ntextinput' => '/Forms/Controls/TextInput.php',
236: 'ntextresponse' => '/Application/Responses/TextResponse.php',
237: 'ntokenizer' => '/Utils/Tokenizer.php',
238: 'ntokenizerexception' => '/Utils/Tokenizer.php',
239: 'nuimacros' => '/Latte/Macros/UIMacros.php',
240: 'nunknownimagefileexception' => '/common/Image.php',
241: 'nuploadcontrol' => '/Forms/Controls/UploadControl.php',
242: 'nurl' => '/Http/Url.php',
243: 'nurlscript' => '/Http/UrlScript.php',
244: 'nuser' => '/Http/User.php',
245: );
246:
247:
248:
249: 250: 251: 252:
253: public static function getInstance()
254: {
255: if (self::$instance === NULL) {
256: self::$instance = new self;
257: }
258: return self::$instance;
259: }
260:
261:
262:
263: 264: 265: 266: 267:
268: public function tryLoad($type)
269: {
270: $type = ltrim(strtolower($type), '\\');
271: if (isset($this->list[$type])) {
272: NLimitedScope::load(NETTE_DIR . $this->list[$type]);
273: self::$count++;
274: }
275: }
276:
277: }
278: