1: <?php
2:
3: 4: 5: 6: 7: 8: 9: 10: 11:
12:
13:
14:
15: 16: 17: 18: 19:
20: class NNetteLoader extends NAutoLoader
21: {
22:
23: private static $instance;
24:
25:
26: public $list = array(
27: 'argumentoutofrangeexception' => '/Utils/exceptions.php',
28: 'datetime53' => '/Utils/DateTime53.php',
29: 'deprecatedexception' => '/Utils/exceptions.php',
30: 'directorynotfoundexception' => '/Utils/exceptions.php',
31: 'fatalerrorexception' => '/Utils/exceptions.php',
32: 'filenotfoundexception' => '/Utils/exceptions.php',
33: 'iannotation' => '/Reflection/IAnnotation.php',
34: 'iauthenticator' => '/Security/IAuthenticator.php',
35: 'iauthorizator' => '/Security/IAuthorizator.php',
36: 'icachejournal' => '/Caching/ICacheJournal.php',
37: 'icachestorage' => '/Caching/ICacheStorage.php',
38: 'icomponent' => '/ComponentModel/IComponent.php',
39: 'icomponentcontainer' => '/ComponentModel/IComponentContainer.php',
40: 'iconfigadapter' => '/Config/IConfigAdapter.php',
41: 'icontext' => '/Utils/IContext.php',
42: 'idebugpanel' => '/Debug/IDebugPanel.php',
43: 'ifiletemplate' => '/Templates/IFileTemplate.php',
44: 'iformcontrol' => '/Forms/IFormControl.php',
45: 'iformrenderer' => '/Forms/IFormRenderer.php',
46: 'ifreezable' => '/Utils/IFreezable.php',
47: 'ihttprequest' => '/Web/IHttpRequest.php',
48: 'ihttpresponse' => '/Web/IHttpResponse.php',
49: 'iidentity' => '/Security/IIdentity.php',
50: 'imailer' => '/Mail/IMailer.php',
51: 'invalidstateexception' => '/Utils/exceptions.php',
52: 'ioexception' => '/Utils/exceptions.php',
53: 'ipartiallyrenderable' => '/Application/IRenderable.php',
54: 'ipresenter' => '/Application/IPresenter.php',
55: 'ipresenterloader' => '/Application/IPresenterLoader.php',
56: 'ipresenterresponse' => '/Application/IPresenterResponse.php',
57: 'irenderable' => '/Application/IRenderable.php',
58: 'iresource' => '/Security/IResource.php',
59: 'irole' => '/Security/IRole.php',
60: 'irouter' => '/Application/IRouter.php',
61: 'isignalreceiver' => '/Application/ISignalReceiver.php',
62: 'istatepersistent' => '/Application/IStatePersistent.php',
63: 'isubmittercontrol' => '/Forms/ISubmitterControl.php',
64: 'itemplate' => '/Templates/ITemplate.php',
65: 'itranslator' => '/Utils/ITranslator.php',
66: 'iuser' => '/Web/IUser.php',
67: 'memberaccessexception' => '/Utils/exceptions.php',
68: 'nabortexception' => '/Application/Exceptions/AbortException.php',
69: 'nambiguousserviceexception' => '/Utils/Context.php',
70: 'nannotation' => '/Reflection/Annotation.php',
71: 'nannotationsparser' => '/Reflection/AnnotationsParser.php',
72: 'nappform' => '/Application/AppForm.php',
73: 'napplication' => '/Application/Application.php',
74: 'napplicationexception' => '/Application/Exceptions/ApplicationException.php',
75: 'narraylist' => '/Utils/ArrayList.php',
76: 'narraytools' => '/Utils/ArrayTools.php',
77: 'nauthenticationexception' => '/Security/AuthenticationException.php',
78: 'nautoloader' => '/Loaders/AutoLoader.php',
79: 'nbadrequestexception' => '/Application/Exceptions/BadRequestException.php',
80: 'nbadsignalexception' => '/Application/Exceptions/BadSignalException.php',
81: 'nbutton' => '/Forms/Controls/Button.php',
82: 'ncache' => '/Caching/Cache.php',
83: 'ncachinghelper' => '/Templates/Filters/CachingHelper.php',
84: 'ncallback' => '/Utils/Callback.php',
85: 'ncallbackfilteriterator' => '/Utils/Iterators/CallbackFilterIterator.php',
86: 'ncheckbox' => '/Forms/Controls/Checkbox.php',
87: 'nclassreflection' => '/Reflection/ClassReflection.php',
88: 'nclirouter' => '/Application/Routers/CliRouter.php',
89: 'nclosurefix' => '/Utils/Framework.php',
90: 'ncomponent' => '/ComponentModel/Component.php',
91: 'ncomponentcontainer' => '/ComponentModel/ComponentContainer.php',
92: 'nconfig' => '/Config/Config.php',
93: 'nconfigadapterini' => '/Config/ConfigAdapterIni.php',
94: 'nconfigurator' => '/Environment/Configurator.php',
95: 'ncontext' => '/Utils/Context.php',
96: 'ncontrol' => '/Application/Control.php',
97: 'nconventionalrenderer' => '/Forms/Renderers/ConventionalRenderer.php',
98: 'ndebug' => '/Debug/Debug.php',
99: 'ndebugpanel' => '/Debug/DebugPanel.php',
100: 'ndownloadresponse' => '/Application/Responses/DownloadResponse.php',
101: 'ndummystorage' => '/Caching/DummyStorage.php',
102: 'nenvironment' => '/Environment/Environment.php',
103: 'nextensionreflection' => '/Reflection/ExtensionReflection.php',
104: 'nfilejournal' => '/Caching/FileJournal.php',
105: 'nfilestorage' => '/Caching/FileStorage.php',
106: 'nfiletemplate' => '/Templates/FileTemplate.php',
107: 'nfileupload' => '/Forms/Controls/FileUpload.php',
108: 'nfinder' => '/Utils/Finder.php',
109: 'nforbiddenrequestexception' => '/Application/Exceptions/ForbiddenRequestException.php',
110: 'nform' => '/Forms/Form.php',
111: 'nformcontainer' => '/Forms/FormContainer.php',
112: 'nformcontrol' => '/Forms/Controls/FormControl.php',
113: 'nformgroup' => '/Forms/FormGroup.php',
114: 'nforwardingresponse' => '/Application/Responses/ForwardingResponse.php',
115: 'nframework' => '/Utils/Framework.php',
116: 'nfreezableobject' => '/Utils/FreezableObject.php',
117: 'nfunctionreflection' => '/Reflection/FunctionReflection.php',
118: 'ngenericrecursiveiterator' => '/Utils/Iterators/GenericRecursiveIterator.php',
119: 'nhiddenfield' => '/Forms/Controls/HiddenField.php',
120: 'nhtml' => '/Web/Html.php',
121: 'nhttpcontext' => '/Web/HttpContext.php',
122: 'nhttprequest' => '/Web/HttpRequest.php',
123: 'nhttpresponse' => '/Web/HttpResponse.php',
124: 'nhttpuploadedfile' => '/Web/HttpUploadedFile.php',
125: 'nidentity' => '/Security/Identity.php',
126: 'nimage' => '/Utils/Image.php',
127: 'nimagebutton' => '/Forms/Controls/ImageButton.php',
128: 'nimagemagick' => '/Utils/ImageMagick.php',
129: 'ninstancefilteriterator' => '/Utils/Iterators/InstanceFilterIterator.php',
130: 'ninvalidlinkexception' => '/Application/Exceptions/InvalidLinkException.php',
131: 'ninvalidpresenterexception' => '/Application/Exceptions/InvalidPresenterException.php',
132: 'njson' => '/Utils/Json.php',
133: 'njsonexception' => '/Utils/Json.php',
134: 'njsonresponse' => '/Application/Responses/JsonResponse.php',
135: 'nlattefilter' => '/Templates/Filters/LatteFilter.php',
136: 'nlattemacros' => '/Templates/Filters/LatteMacros.php',
137: 'nlimitedscope' => '/Loaders/LimitedScope.php',
138: 'nlink' => '/Application/Link.php',
139: 'nmail' => '/Mail/Mail.php',
140: 'nmailmimepart' => '/Mail/MailMimePart.php',
141: 'nmemcachedstorage' => '/Caching/MemcachedStorage.php',
142: 'nmemorystorage' => '/Caching/MemoryStorage.php',
143: 'nmethodreflection' => '/Reflection/MethodReflection.php',
144: 'nmultirouter' => '/Application/Routers/MultiRouter.php',
145: 'nmultiselectbox' => '/Forms/Controls/MultiSelectBox.php',
146: 'nneonexception' => '/Utils/NeonParser.php',
147: 'nneonparser' => '/Utils/NeonParser.php',
148: 'nnetteloader' => '/Loaders/NetteLoader.php',
149: 'nobject' => '/Utils/Object.php',
150: 'nobjectmixin' => '/Utils/ObjectMixin.php',
151: 'notimplementedexception' => '/Utils/exceptions.php',
152: 'notsupportedexception' => '/Utils/exceptions.php',
153: 'npaginator' => '/Utils/Paginator.php',
154: 'nparameterreflection' => '/Reflection/ParameterReflection.php',
155: 'npermission' => '/Security/Permission.php',
156: 'npresenter' => '/Application/Presenter.php',
157: 'npresentercomponent' => '/Application/PresenterComponent.php',
158: 'npresentercomponentreflection' => '/Application/PresenterComponentReflection.php',
159: 'npresenterloader' => '/Application/PresenterLoader.php',
160: 'npresenterrequest' => '/Application/PresenterRequest.php',
161: 'npropertyreflection' => '/Reflection/PropertyReflection.php',
162: 'nradiolist' => '/Forms/Controls/RadioList.php',
163: 'nrecursivecallbackfilteriterator' => '/Utils/Iterators/CallbackFilterIterator.php',
164: 'nrecursivecomponentiterator' => '/ComponentModel/ComponentContainer.php',
165: 'nredirectingresponse' => '/Application/Responses/RedirectingResponse.php',
166: 'nregexpexception' => '/Utils/String.php',
167: 'nrenderresponse' => '/Application/Responses/RenderResponse.php',
168: 'nrobotloader' => '/Loaders/RobotLoader.php',
169: 'nroute' => '/Application/Routers/Route.php',
170: 'nroutingdebugger' => '/Application/RoutingDebugger.php',
171: 'nrule' => '/Forms/Rule.php',
172: 'nrules' => '/Forms/Rules.php',
173: 'nsafestream' => '/Utils/SafeStream.php',
174: 'nselectbox' => '/Forms/Controls/SelectBox.php',
175: 'nsendmailmailer' => '/Mail/SendmailMailer.php',
176: 'nsession' => '/Web/Session.php',
177: 'nsessionnamespace' => '/Web/SessionNamespace.php',
178: 'nsimpleauthenticator' => '/Security/SimpleAuthenticator.php',
179: 'nsimplerouter' => '/Application/Routers/SimpleRouter.php',
180: 'nsmartcachingiterator' => '/Utils/Iterators/SmartCachingIterator.php',
181: 'nsmtpexception' => '/Mail/SmtpMailer.php',
182: 'nsmtpmailer' => '/Mail/SmtpMailer.php',
183: 'nsnippethelper' => '/Templates/Filters/SnippetHelper.php',
184: 'nsqlitejournal' => '/Caching/SqliteJournal.php',
185: 'nstring' => '/Utils/String.php',
186: 'nsubmitbutton' => '/Forms/Controls/SubmitButton.php',
187: 'ntemplate' => '/Templates/Template.php',
188: 'ntemplatecachestorage' => '/Templates/TemplateCacheStorage.php',
189: 'ntemplatefilters' => '/Templates/Filters/TemplateFilters.php',
190: 'ntemplatehelpers' => '/Templates/Filters/TemplateHelpers.php',
191: 'ntextarea' => '/Forms/Controls/TextArea.php',
192: 'ntextbase' => '/Forms/Controls/TextBase.php',
193: 'ntextinput' => '/Forms/Controls/TextInput.php',
194: 'ntokenizer' => '/Utils/Tokenizer.php',
195: 'ntokenizerexception' => '/Utils/Tokenizer.php',
196: 'ntools' => '/Utils/Tools.php',
197: 'nuri' => '/Web/Uri.php',
198: 'nuriscript' => '/Web/UriScript.php',
199: 'nuser' => '/Web/User.php',
200: );
201:
202:
203:
204: 205: 206: 207:
208: public static function getInstance()
209: {
210: if (self::$instance === NULL) {
211: self::$instance = new self;
212: }
213: return self::$instance;
214: }
215:
216:
217:
218: 219: 220: 221: 222:
223: public function tryLoad($type)
224: {
225: $type = ltrim(strtolower($type), '\\');
226: if (isset($this->list[$type])) {
227: NLimitedScope::load(NETTE_DIR . $this->list[$type]);
228: self::$count++;
229: }
230: }
231:
232: }
233: