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' => '/common/exceptions.php',
28: 'deprecatedexception' => '/common/exceptions.php',
29: 'directorynotfoundexception' => '/common/exceptions.php',
30: 'fatalerrorexception' => '/common/exceptions.php',
31: 'filenotfoundexception' => '/common/exceptions.php',
32: 'iannotation' => '/Reflection/IAnnotation.php',
33: 'iauthenticator' => '/Security/IAuthenticator.php',
34: 'iauthorizator' => '/Security/IAuthorizator.php',
35: 'icachejournal' => '/Caching/Storages/IJournal.php',
36: 'icachestorage' => '/Caching/IStorage.php',
37: 'icomponent' => '/ComponentModel/IComponent.php',
38: 'icomponentcontainer' => '/ComponentModel/IContainer.php',
39: 'iconfigadapter' => '/Config/IAdapter.php',
40: 'icontext' => '/DI/IContext.php',
41: 'idebugpanel' => '/Diagnostics/IPanel.php',
42: 'ifiletemplate' => '/Templating/IFileTemplate.php',
43: 'iformcontrol' => '/Forms/IControl.php',
44: 'iformrenderer' => '/Forms/IFormRenderer.php',
45: 'ifreezable' => '/common/IFreezable.php',
46: 'ihttprequest' => '/Http/IRequest.php',
47: 'ihttpresponse' => '/Http/IResponse.php',
48: 'iidentity' => '/Security/IIdentity.php',
49: 'imailer' => '/Mail/IMailer.php',
50: 'invalidstateexception' => '/common/exceptions.php',
51: 'ioexception' => '/common/exceptions.php',
52: 'ipartiallyrenderable' => '/Application/UI/IPartiallyRenderable.php',
53: 'ipresenter' => '/Application/IPresenter.php',
54: 'ipresenterfactory' => '/Application/IPresenterFactory.php',
55: 'ipresenterresponse' => '/Application/IResponse.php',
56: 'irenderable' => '/Application/UI/IRenderable.php',
57: 'iresource' => '/Security/IResource.php',
58: 'irole' => '/Security/IRole.php',
59: 'irouter' => '/Application/IRouter.php',
60: 'isessionstorage' => '/Http/ISessionStorage.php',
61: 'isignalreceiver' => '/Application/UI/ISignalReceiver.php',
62: 'istatepersistent' => '/Application/UI/IStatePersistent.php',
63: 'isubmittercontrol' => '/Forms/ISubmitterControl.php',
64: 'isupplementaldriver' => '/Database/ISupplementalDriver.php',
65: 'itemplate' => '/Templating/ITemplate.php',
66: 'itranslator' => '/Localization/ITranslator.php',
67: 'iuser' => '/Http/IUser.php',
68: 'memberaccessexception' => '/common/exceptions.php',
69: 'nabortexception' => '/Application/exceptions.php',
70: 'nambiguousserviceexception' => '/DI/AmbiguousServiceException.php',
71: 'nannotation' => '/Reflection/Annotation.php',
72: 'nannotationsparser' => '/Reflection/AnnotationsParser.php',
73: 'nappform' => '/Application/UI/Form.php',
74: 'napplication' => '/Application/Application.php',
75: 'napplicationexception' => '/Application/exceptions.php',
76: 'narrayhash' => '/common/ArrayHash.php',
77: 'narraylist' => '/common/ArrayList.php',
78: 'narraytools' => '/common/ArrayUtils.php',
79: 'nauthenticationexception' => '/Security/AuthenticationException.php',
80: 'nautoloader' => '/Loaders/AutoLoader.php',
81: 'nbadrequestexception' => '/Application/exceptions.php',
82: 'nbadsignalexception' => '/Application/UI/BadSignalException.php',
83: 'nbutton' => '/Forms/Controls/Button.php',
84: 'ncache' => '/Caching/Cache.php',
85: 'ncachinghelper' => '/Caching/OutputHelper.php',
86: 'ncallback' => '/common/Callback.php',
87: 'ncallbackfilteriterator' => '/Iterators/Filter.php',
88: 'ncheckbox' => '/Forms/Controls/Checkbox.php',
89: 'nclassreflection' => '/Reflection/ClassType.php',
90: 'nclirouter' => '/Application/Routers/CliRouter.php',
91: 'nclosurefix' => '/common/Framework.php',
92: 'ncomponent' => '/ComponentModel/Component.php',
93: 'ncomponentcontainer' => '/ComponentModel/Container.php',
94: 'nconfig' => '/Config/Config.php',
95: 'nconfigadapterini' => '/Config/IniAdapter.php',
96: 'nconfigadapterneon' => '/Config/NeonAdapter.php',
97: 'nconfigurator' => '/DI/Configurator.php',
98: 'nconnection' => '/Database/Connection.php',
99: 'ncontext' => '/DI/Context.php',
100: 'ncontrol' => '/Application/UI/Control.php',
101: 'ncriticalsection' => '/Utils/CriticalSection.php',
102: 'ndatabasepanel' => '/Database/Diagnostics/ConnectionPanel.php',
103: 'ndatabasereflection' => '/Database/Reflection/DatabaseReflection.php',
104: 'ndatetime53' => '/common/DateTime.php',
105: 'ndebug' => '/Diagnostics/Debugger.php',
106: 'ndebughelpers' => '/Diagnostics/Helpers.php',
107: 'ndebugpanel' => '/Diagnostics/Panel.php',
108: 'ndefaultformrenderer' => '/Forms/Rendering/DefaultFormRenderer.php',
109: 'ndownloadresponse' => '/Application/Responses/FileResponse.php',
110: 'ndummystorage' => '/Caching/Storages/DevNullStorage.php',
111: 'nenvironment' => '/common/Environment.php',
112: 'nextensionreflection' => '/Reflection/Extension.php',
113: 'nfilejournal' => '/Caching/Storages/FileJournal.php',
114: 'nfilestorage' => '/Caching/Storages/FileStorage.php',
115: 'nfiletemplate' => '/Templating/FileTemplate.php',
116: 'nfileupload' => '/Forms/Controls/UploadControl.php',
117: 'nfinder' => '/Utils/Finder.php',
118: 'nforbiddenrequestexception' => '/Application/exceptions.php',
119: 'nform' => '/Forms/Form.php',
120: 'nformcontainer' => '/Forms/Container.php',
121: 'nformcontrol' => '/Forms/Controls/BaseControl.php',
122: 'nformgroup' => '/Forms/ControlGroup.php',
123: 'nforwardingresponse' => '/Application/Responses/ForwardResponse.php',
124: 'nframework' => '/common/Framework.php',
125: 'nfreezableobject' => '/common/FreezableObject.php',
126: 'nfunctionreflection' => '/Reflection/GlobalFunction.php',
127: 'ngenericrecursiveiterator' => '/Iterators/Recursor.php',
128: 'ngroupedtableselection' => '/Database/Table/GroupedSelection.php',
129: 'nhiddenfield' => '/Forms/Controls/HiddenField.php',
130: 'nhtml' => '/Utils/Html.php',
131: 'nhttpcontext' => '/Http/Context.php',
132: 'nhttprequest' => '/Http/Request.php',
133: 'nhttprequestfactory' => '/Http/RequestFactory.php',
134: 'nhttpresponse' => '/Http/Response.php',
135: 'nhttpuploadedfile' => '/Http/FileUpload.php',
136: 'nidentity' => '/Security/Identity.php',
137: 'nimage' => '/common/Image.php',
138: 'nimagebutton' => '/Forms/Controls/ImageButton.php',
139: 'ninstancefilteriterator' => '/Iterators/InstanceFilter.php',
140: 'ninvalidlinkexception' => '/Application/UI/InvalidLinkException.php',
141: 'ninvalidpresenterexception' => '/Application/exceptions.php',
142: 'njson' => '/Utils/Json.php',
143: 'njsonexception' => '/Utils/Json.php',
144: 'njsonresponse' => '/Application/Responses/JsonResponse.php',
145: 'nlatteexception' => '/Latte/ParseException.php',
146: 'nlattefilter' => '/Latte/Engine.php',
147: 'nlattemacros' => '/Latte/DefaultMacros.php',
148: 'nlimitedscope' => '/Utils/LimitedScope.php',
149: 'nlink' => '/Application/UI/Link.php',
150: 'nmail' => '/Mail/Message.php',
151: 'nmailmimepart' => '/Mail/MimePart.php',
152: 'nmapiterator' => '/Iterators/Mapper.php',
153: 'nmemcachedstorage' => '/Caching/Storages/MemcachedStorage.php',
154: 'nmemorystorage' => '/Caching/Storages/MemoryStorage.php',
155: 'nmethodreflection' => '/Reflection/Method.php',
156: 'nmimetypedetector' => '/Utils/MimeTypeDetector.php',
157: 'nmultirouter' => '/Application/Routers/RouteList.php',
158: 'nmultiselectbox' => '/Forms/Controls/MultiSelectBox.php',
159: 'nneon' => '/Utils/Neon.php',
160: 'nneonexception' => '/Utils/Neon.php',
161: 'nnetteloader' => '/Loaders/NetteLoader.php',
162: 'nobject' => '/common/Object.php',
163: 'nobjectmixin' => '/common/ObjectMixin.php',
164: 'notimplementedexception' => '/common/exceptions.php',
165: 'notsupportedexception' => '/common/exceptions.php',
166: 'npaginator' => '/Utils/Paginator.php',
167: 'nparameterreflection' => '/Reflection/Parameter.php',
168: 'npdomssqldriver' => '/Database/Drivers/MsSqlDriver.php',
169: 'npdomysqldriver' => '/Database/Drivers/MySqlDriver.php',
170: 'npdoocidriver' => '/Database/Drivers/OciDriver.php',
171: 'npdoodbcdriver' => '/Database/Drivers/OdbcDriver.php',
172: 'npdopgsqldriver' => '/Database/Drivers/PgSqlDriver.php',
173: 'npdosqlite2driver' => '/Database/Drivers/Sqlite2Driver.php',
174: 'npdosqlitedriver' => '/Database/Drivers/SqliteDriver.php',
175: 'npermission' => '/Security/Permission.php',
176: 'npresenter' => '/Application/UI/Presenter.php',
177: 'npresentercomponent' => '/Application/UI/PresenterComponent.php',
178: 'npresentercomponentreflection' => '/Application/UI/PresenterComponentReflection.php',
179: 'npresenterfactory' => '/Application/PresenterFactory.php',
180: 'npresenterrequest' => '/Application/Request.php',
181: 'npropertyreflection' => '/Reflection/Property.php',
182: 'nradiolist' => '/Forms/Controls/RadioList.php',
183: 'nrecursivecallbackfilteriterator' => '/Iterators/RecursiveFilter.php',
184: 'nrecursivecomponentiterator' => '/ComponentModel/RecursiveComponentIterator.php',
185: 'nredirectingresponse' => '/Application/Responses/RedirectResponse.php',
186: 'nregexpexception' => '/common/StringUtils.php',
187: 'nrenderresponse' => '/Application/Responses/TextResponse.php',
188: 'nrobotloader' => '/Loaders/RobotLoader.php',
189: 'nroute' => '/Application/Routers/Route.php',
190: 'nroutingdebugger' => '/Application/Diagnostics/RoutingPanel.php',
191: 'nrow' => '/Database/Row.php',
192: 'nrule' => '/Forms/Rule.php',
193: 'nrules' => '/Forms/Rules.php',
194: 'nsafestream' => '/Utils/SafeStream.php',
195: 'nselectbox' => '/Forms/Controls/SelectBox.php',
196: 'nsendmailmailer' => '/Mail/SendmailMailer.php',
197: 'nsession' => '/Http/Session.php',
198: 'nsessionnamespace' => '/Http/SessionNamespace.php',
199: 'nsimpleauthenticator' => '/Security/SimpleAuthenticator.php',
200: 'nsimplerouter' => '/Application/Routers/SimpleRouter.php',
201: 'nsmartcachingiterator' => '/Iterators/CachingIterator.php',
202: 'nsmtpexception' => '/Mail/SmtpMailer.php',
203: 'nsmtpmailer' => '/Mail/SmtpMailer.php',
204: 'nsqlliteral' => '/Database/SqlLiteral.php',
205: 'nsqlpreprocessor' => '/Database/SqlPreprocessor.php',
206: 'nstatement' => '/Database/Statement.php',
207: 'nstring' => '/common/StringUtils.php',
208: 'nsubmitbutton' => '/Forms/Controls/SubmitButton.php',
209: 'ntablerow' => '/Database/Table/ActiveRow.php',
210: 'ntableselection' => '/Database/Table/Selection.php',
211: 'ntemplate' => '/Templating/Template.php',
212: 'ntemplatecachestorage' => '/Templating/PhpFileStorage.php',
213: 'ntemplateexception' => '/Templating/FilterException.php',
214: 'ntemplatehelpers' => '/Templating/DefaultHelpers.php',
215: 'ntextarea' => '/Forms/Controls/TextArea.php',
216: 'ntextbase' => '/Forms/Controls/TextBase.php',
217: 'ntextinput' => '/Forms/Controls/TextInput.php',
218: 'ntokenizer' => '/Utils/Tokenizer.php',
219: 'ntokenizerexception' => '/Utils/Tokenizer.php',
220: 'nuri' => '/Http/Url.php',
221: 'nuriscript' => '/Http/UrlScript.php',
222: 'nuser' => '/Http/User.php',
223: );
224:
225:
226:
227: 228: 229: 230:
231: public static function getInstance()
232: {
233: if (self::$instance === NULL) {
234: self::$instance = new self;
235: }
236: return self::$instance;
237: }
238:
239:
240:
241: 242: 243: 244: 245:
246: public function tryLoad($type)
247: {
248: $type = ltrim(strtolower($type), '\\');
249: if (isset($this->list[$type])) {
250: NLimitedScope::load(NETTE_DIR . $this->list[$type]);
251: self::$count++;
252: }
253: }
254:
255: }
256: