Source for file NetteLoader.php
Documentation is available at NetteLoader.php
6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
8: * This source file is subject to the "Nette license" that is bundled
9: * with this package in the file license.txt.
11: * For more information please see http://nettephp.com
13: * @copyright Copyright (c) 2004, 2009 David Grudl
14: * @license http://nettephp.com/license Nette license
15: * @link http://nettephp.com
22: require_once dirname(__FILE__) .
'/../Loaders/AutoLoader.php';
27: * Nette auto loader is responsible for loading Nette classes and interfaces.
29: * @author David Grudl
30: * @copyright Copyright (c) 2004, 2009 David Grudl
35: /** @var NNetteLoader */
36: public static $instance;
38: /** @var string base file path */
43: 'argumentoutofrangeexception' =>
'/exceptions.php',
44: 'deprecatedexception' =>
'/exceptions.php',
45: 'directorynotfoundexception' =>
'/exceptions.php',
46: 'fatalerrorexception' =>
'/exceptions.php',
47: 'filenotfoundexception' =>
'/exceptions.php',
48: 'iauthenticator' =>
'/Security/IAuthenticator.php',
49: 'iauthorizator' =>
'/Security/IAuthorizator.php',
50: 'icachestorage' =>
'/Caching/ICacheStorage.php',
51: 'icollection' =>
'/Collections/ICollection.php',
52: 'icomponent' =>
'/IComponent.php',
53: 'icomponentcontainer' =>
'/IComponentContainer.php',
54: 'iconfigadapter' =>
'/Config/IConfigAdapter.php',
55: 'idebuggable' =>
'/IDebuggable.php',
56: 'ifiletemplate' =>
'/Templates/IFileTemplate.php',
57: 'iformcontrol' =>
'/Forms/IFormControl.php',
58: 'iformrenderer' =>
'/Forms/IFormRenderer.php',
59: 'ihttprequest' =>
'/Web/IHttpRequest.php',
60: 'ihttpresponse' =>
'/Web/IHttpResponse.php',
61: 'iidentity' =>
'/Security/IIdentity.php',
62: 'ilist' =>
'/Collections/IList.php',
63: 'imailer' =>
'/Mail/IMailer.php',
64: 'imap' =>
'/Collections/IMap.php',
65: 'inamingcontainer' =>
'/Forms/INamingContainer.php',
66: 'invalidstateexception' =>
'/exceptions.php',
67: 'ioexception' =>
'/exceptions.php',
68: 'ipartiallyrenderable' =>
'/Application/IRenderable.php',
69: 'ipermissionassertion' =>
'/Security/IPermissionAssertion.php',
70: 'ipresenter' =>
'/Application/IPresenter.php',
71: 'ipresenterloader' =>
'/Application/IPresenterLoader.php',
72: 'ipresenterresponse' =>
'/Application/IPresenterResponse.php',
73: 'irenderable' =>
'/Application/IRenderable.php',
74: 'iresource' =>
'/Security/IResource.php',
75: 'irole' =>
'/Security/IRole.php',
76: 'irouter' =>
'/Application/IRouter.php',
77: 'iservicelocator' =>
'/IServiceLocator.php',
78: 'iset' =>
'/Collections/ISet.php',
79: 'isignalreceiver' =>
'/Application/ISignalReceiver.php',
80: 'istatepersistent' =>
'/Application/IStatePersistent.php',
81: 'isubmittercontrol' =>
'/Forms/ISubmitterControl.php',
82: 'itemplate' =>
'/Templates/ITemplate.php',
83: 'itranslator' =>
'/ITranslator.php',
84: 'iuser' =>
'/Web/IUser.php',
85: 'lattefilter' =>
'/Templates/Filters/LatteFilter.php',
86: 'lattemacros' =>
'/Templates/Filters/LatteMacros.php',
87: 'memberaccessexception' =>
'/exceptions.php',
88: 'nabortexception' =>
'/Application/Exceptions/AbortException.php',
89: 'nambiguousserviceexception' =>
'/ServiceLocator.php',
90: 'nannotations' =>
'/Annotations.php',
91: 'nappform' =>
'/Application/AppForm.php',
92: 'napplication' =>
'/Application/Application.php',
93: 'napplicationexception' =>
'/Application/Exceptions/ApplicationException.php',
94: 'narraylist' =>
'/Collections/ArrayList.php',
95: 'narraytools' =>
'/ArrayTools.php',
96: 'nauthenticationexception' =>
'/Security/AuthenticationException.php',
97: 'nautoloader' =>
'/Loaders/AutoLoader.php',
98: 'nbadrequestexception' =>
'/Application/Exceptions/BadRequestException.php',
99: 'nbadsignalexception' =>
'/Application/Exceptions/BadSignalException.php',
100: 'nbasetemplate' =>
'/Templates/BaseTemplate.php',
101: 'nbutton' =>
'/Forms/Controls/Button.php',
102: 'ncache' =>
'/Caching/Cache.php',
103: 'ncachinghelper' =>
'/Templates/Filters/CachingHelper.php',
104: 'ncheckbox' =>
'/Forms/Controls/Checkbox.php',
105: 'nclirouter' =>
'/Application/Routers/CliRouter.php',
106: 'ncollection' =>
'/Collections/Collection.php',
107: 'ncomponent' =>
'/Component.php',
108: 'ncomponentcontainer' =>
'/ComponentContainer.php',
109: 'nconfig' =>
'/Config/Config.php',
110: 'nconfigadapterini' =>
'/Config/ConfigAdapterIni.php',
111: 'nconfigadapterxml' =>
'/Config/ConfigAdapterXml.php',
112: 'nconfigurator' =>
'/Configurator.php',
113: 'ncontrol' =>
'/Application/Control.php',
114: 'nconventionalrenderer' =>
'/Forms/Renderers/ConventionalRenderer.php',
115: 'ncurlybracketsfilter' =>
'/Templates/Filters/LatteFilter.php',
116: 'ncurlybracketsmacros' =>
'/Templates/Filters/LatteFilter.php',
117: 'ndebug' =>
'/Debug.php',
118: 'ndownloadresponse' =>
'/Application/Responses/DownloadResponse.php',
119: 'ndummystorage' =>
'/Caching/DummyStorage.php',
120: 'nenvironment' =>
'/Environment.php',
121: 'nfilestorage' =>
'/Caching/FileStorage.php',
122: 'nfileupload' =>
'/Forms/Controls/FileUpload.php',
123: 'nform' =>
'/Forms/Form.php',
124: 'nformcontainer' =>
'/Forms/FormContainer.php',
125: 'nformcontrol' =>
'/Forms/Controls/FormControl.php',
126: 'nformgroup' =>
'/Forms/FormGroup.php',
127: 'nforwardingresponse' =>
'/Application/Responses/ForwardingResponse.php',
128: 'nframework' =>
'/Framework.php',
129: 'nfreezableobject' =>
'/FreezableObject.php',
130: 'nftp' =>
'/Web/Ftp.php',
131: 'nftpexception' =>
'/Web/Ftp.php',
132: 'nhashtable' =>
'/Collections/Hashtable.php',
133: 'nhiddenfield' =>
'/Forms/Controls/HiddenField.php',
134: 'nhtml' =>
'/Web/Html.php',
135: 'nhttprequest' =>
'/Web/HttpRequest.php',
136: 'nhttpresponse' =>
'/Web/HttpResponse.php',
137: 'nhttpuploadedfile' =>
'/Web/HttpUploadedFile.php',
138: 'nidentity' =>
'/Security/Identity.php',
139: 'nimage' =>
'/Image.php',
140: 'nimagebutton' =>
'/Forms/Controls/ImageButton.php',
141: 'nimagemagick' =>
'/ImageMagick.php',
142: 'ninstancefilteriterator' =>
'/InstanceFilterIterator.php',
143: 'ninstantclientscript' =>
'/Forms/Renderers/InstantClientScript.php',
144: 'ninvalidlinkexception' =>
'/Application/Exceptions/InvalidLinkException.php',
145: 'ninvalidpresenterexception' =>
'/Application/Exceptions/InvalidPresenterException.php',
146: 'njsonresponse' =>
'/Application/Responses/JsonResponse.php',
147: 'nkeynotfoundexception' =>
'/Collections/Hashtable.php',
148: 'nlimitedscope' =>
'/Loaders/LimitedScope.php',
149: 'nlink' =>
'/Application/Link.php',
150: 'nmail' =>
'/Mail/Mail.php',
151: 'nmailmimepart' =>
'/Mail/MailMimePart.php',
152: 'nmemcachedstorage' =>
'/Caching/MemcachedStorage.php',
153: 'nmultirouter' =>
'/Application/Routers/MultiRouter.php',
154: 'nmultiselectbox' =>
'/Forms/Controls/MultiSelectBox.php',
155: 'nnetteloader' =>
'/Loaders/NetteLoader.php',
156: 'nobject' =>
'/Object.php',
157: 'nobjectmixin' =>
'/ObjectMixin.php',
158: 'notimplementedexception' =>
'/exceptions.php',
159: 'notsupportedexception' =>
'/exceptions.php',
160: 'npaginator' =>
'/Paginator.php',
161: 'npermission' =>
'/Security/Permission.php',
162: 'npresenter' =>
'/Application/Presenter.php',
163: 'npresentercomponent' =>
'/Application/PresenterComponent.php',
164: 'npresenterhelpers' =>
'/Application/PresenterHelpers.php',
165: 'npresenterloader' =>
'/Application/PresenterLoader.php',
166: 'npresenterrequest' =>
'/Application/PresenterRequest.php',
167: 'nradiolist' =>
'/Forms/Controls/RadioList.php',
168: 'nrecursivecomponentiterator' =>
'/ComponentContainer.php',
169: 'nrecursivehtmliterator' =>
'/Web/Html.php',
170: 'nredirectingresponse' =>
'/Application/Responses/RedirectingResponse.php',
171: 'nrenderresponse' =>
'/Application/Responses/RenderResponse.php',
172: 'nrepeatercontrol' =>
'/Forms/Controls/RepeaterControl.php',
173: 'nrobotloader' =>
'/Loaders/RobotLoader.php',
174: 'nroute' =>
'/Application/Routers/Route.php',
175: 'nrule' =>
'/Forms/Rule.php',
176: 'nrules' =>
'/Forms/Rules.php',
177: 'nsafestream' =>
'/IO/SafeStream.php',
178: 'nselectbox' =>
'/Forms/Controls/SelectBox.php',
179: 'nsendmailmailer' =>
'/Mail/SendmailMailer.php',
180: 'nservicelocator' =>
'/ServiceLocator.php',
181: 'nsession' =>
'/Web/Session.php',
182: 'nsessionnamespace' =>
'/Web/SessionNamespace.php',
183: 'nset' =>
'/Collections/Set.php',
184: 'nsimpleauthenticator' =>
'/Security/SimpleAuthenticator.php',
185: 'nsimpleloader' =>
'/Loaders/SimpleLoader.php',
186: 'nsimplerouter' =>
'/Application/Routers/SimpleRouter.php',
187: 'nsmartcachingiterator' =>
'/SmartCachingIterator.php',
188: 'nsnippethelper' =>
'/Templates/Filters/SnippetHelper.php',
189: 'nstring' =>
'/String.php',
190: 'nsubmitbutton' =>
'/Forms/Controls/SubmitButton.php',
191: 'ntemplate' =>
'/Templates/Template.php',
192: 'ntemplatecachestorage' =>
'/Templates/TemplateCacheStorage.php',
193: 'ntemplatefilters' =>
'/Templates/Filters/TemplateFilters.php',
194: 'ntemplatehelpers' =>
'/Templates/Filters/TemplateHelpers.php',
195: 'ntextarea' =>
'/Forms/Controls/TextArea.php',
196: 'ntextbase' =>
'/Forms/Controls/TextBase.php',
197: 'ntextinput' =>
'/Forms/Controls/TextInput.php',
198: 'ntools' =>
'/Tools.php',
199: 'nuri' =>
'/Web/Uri.php',
200: 'nuriscript' =>
'/Web/UriScript.php',
201: 'nuser' =>
'/Web/User.php',
202: 'nuserclientscript' =>
'/Forms/Renderers/UserClientScript.php',
208: * Returns singleton instance with lazy instantiation.
209: * @return NNetteLoader
213: if (self::$instance ===
NULL) {
214: self::$instance =
new self;
216: return self::$instance;
222: * Handles autoloading of classes or interfaces.
228: $type =
strtolower($type);