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 https://nette.org
13: * @copyright Copyright (c) 2004, 2009 David Grudl
14: * @license https://nette.org/license Nette license
15: * @link https://nette.org
17: * @package Nette\Loaders
23: require_once dirname(__FILE__) .
'/../Loaders/AutoLoader.php';
28: * Nette auto loader is responsible for loading Nette classes and interfaces.
30: * @author David Grudl
31: * @copyright Copyright (c) 2004, 2009 David Grudl
32: * @package Nette\Loaders
36: /** @var NetteLoader */
37: public static $instance;
39: /** @var string base file path */
44: 'abortexception' =>
'/Application/AbortException.php',
45: 'ajaxdriver' =>
'/Application/AjaxDriver.php',
46: 'ambiguousserviceexception' =>
'/ServiceLocator.php',
47: 'annotations' =>
'/Annotations.php',
48: 'appform' =>
'/Application/AppForm.php',
49: 'application' =>
'/Application/Application.php',
50: 'applicationexception' =>
'/Application/ApplicationException.php',
51: 'argumentoutofrangeexception' =>
'/exceptions.php',
52: 'arraylist' =>
'/Collections/ArrayList.php',
53: 'authenticationexception' =>
'/Security/AuthenticationException.php',
54: 'autoloader' =>
'/Loaders/AutoLoader.php',
55: 'badrequestexception' =>
'/Application/BadRequestException.php',
56: 'badsignalexception' =>
'/Application/BadSignalException.php',
57: 'button' =>
'/Forms/Controls/Button.php',
58: 'cache' =>
'/Caching/Cache.php',
59: 'cachinghelper' =>
'/Templates/Filters/CachingHelper.php',
60: 'checkbox' =>
'/Forms/Controls/Checkbox.php',
61: 'collection' =>
'/Collections/Collection.php',
62: 'component' =>
'/Component.php',
63: 'componentcontainer' =>
'/ComponentContainer.php',
64: 'config' =>
'/Config/Config.php',
65: 'configadapterini' =>
'/Config/ConfigAdapterIni.php',
66: 'configadapterxml' =>
'/Config/ConfigAdapterXml.php',
67: 'configurator' =>
'/Configurator.php',
68: 'control' =>
'/Application/Control.php',
69: 'conventionalrenderer' =>
'/Forms/Renderers/ConventionalRenderer.php',
70: 'curlybracketsfilter' =>
'/Templates/Filters/CurlyBracketsFilter.php',
71: 'debug' =>
'/Debug.php',
72: 'deprecatedexception' =>
'/exceptions.php',
73: 'directorynotfoundexception' =>
'/exceptions.php',
74: 'dummystorage' =>
'/Caching/DummyStorage.php',
75: 'environment' =>
'/Environment.php',
76: 'fatalerrorexception' =>
'/exceptions.php',
77: 'filenotfoundexception' =>
'/exceptions.php',
78: 'filestorage' =>
'/Caching/FileStorage.php',
79: 'fileupload' =>
'/Forms/Controls/FileUpload.php',
80: 'form' =>
'/Forms/Form.php',
81: 'formcontainer' =>
'/Forms/FormContainer.php',
82: 'formcontrol' =>
'/Forms/Controls/FormControl.php',
83: 'formgroup' =>
'/Forms/FormGroup.php',
84: 'forwardingexception' =>
'/Application/ForwardingException.php',
85: 'framework' =>
'/Framework.php',
86: 'ftp' =>
'/Web/Ftp.php',
87: 'ftpexception' =>
'/Web/Ftp.php',
88: 'hashtable' =>
'/Collections/Hashtable.php',
89: 'hiddenfield' =>
'/Forms/Controls/HiddenField.php',
90: 'html' =>
'/Web/Html.php',
91: 'httprequest' =>
'/Web/HttpRequest.php',
92: 'httpresponse' =>
'/Web/HttpResponse.php',
93: 'httpuploadedfile' =>
'/Web/HttpUploadedFile.php',
94: 'iajaxdriver' =>
'/Application/IAjaxDriver.php',
95: 'iauthenticator' =>
'/Security/IAuthenticator.php',
96: 'iauthorizator' =>
'/Security/IAuthorizator.php',
97: 'icachestorage' =>
'/Caching/ICacheStorage.php',
98: 'icollection' =>
'/Collections/ICollection.php',
99: 'icomponent' =>
'/IComponent.php',
100: 'icomponentcontainer' =>
'/IComponentContainer.php',
101: 'iconfigadapter' =>
'/Config/IConfigAdapter.php',
102: 'idebuggable' =>
'/IDebuggable.php',
103: 'identity' =>
'/Security/Identity.php',
104: 'ifiletemplate' =>
'/Templates/IFileTemplate.php',
105: 'iformcontrol' =>
'/Forms/IFormControl.php',
106: 'iformrenderer' =>
'/Forms/IFormRenderer.php',
107: 'ihttprequest' =>
'/Web/IHttpRequest.php',
108: 'ihttpresponse' =>
'/Web/IHttpResponse.php',
109: 'iidentity' =>
'/Security/IIdentity.php',
110: 'ilist' =>
'/Collections/IList.php',
111: 'image' =>
'/Image.php',
112: 'imagebutton' =>
'/Forms/Controls/ImageButton.php',
113: 'imagemagick' =>
'/ImageMagick.php',
114: 'imap' =>
'/Collections/IMap.php',
115: 'inamingcontainer' =>
'/Forms/INamingContainer.php',
116: 'instancefilteriterator' =>
'/InstanceFilterIterator.php',
117: 'instantclientscript' =>
'/Forms/Renderers/InstantClientScript.php',
118: 'invalidlinkexception' =>
'/Application/InvalidLinkException.php',
119: 'invalidpresenterexception' =>
'/Application/InvalidPresenterException.php',
120: 'invalidstateexception' =>
'/exceptions.php',
121: 'ioexception' =>
'/exceptions.php',
122: 'ipartiallyrenderable' =>
'/Application/IRenderable.php',
123: 'ipermissionassertion' =>
'/Security/IPermissionAssertion.php',
124: 'ipresenter' =>
'/Application/IPresenter.php',
125: 'ipresenterloader' =>
'/Application/IPresenterLoader.php',
126: 'irenderable' =>
'/Application/IRenderable.php',
127: 'iresource' =>
'/Security/IResource.php',
128: 'irole' =>
'/Security/IRole.php',
129: 'irouter' =>
'/Application/IRouter.php',
130: 'iservicelocator' =>
'/IServiceLocator.php',
131: 'iset' =>
'/Collections/ISet.php',
132: 'isignalreceiver' =>
'/Application/ISignalReceiver.php',
133: 'istatepersistent' =>
'/Application/IStatePersistent.php',
134: 'isubmittercontrol' =>
'/Forms/ISubmitterControl.php',
135: 'itemplate' =>
'/Templates/ITemplate.php',
136: 'itranslator' =>
'/ITranslator.php',
137: 'iuser' =>
'/Web/IUser.php',
138: 'javascript' =>
'/Web/JavaScript.php',
139: 'javascriptconsole' =>
'/Web/JavaScriptConsole.php',
140: 'keynotfoundexception' =>
'/Collections/Hashtable.php',
141: 'limitedscope' =>
'/Loaders/LimitedScope.php',
142: 'link' =>
'/Application/Link.php',
143: 'logger' =>
'/Logger.php',
144: 'memberaccessexception' =>
'/exceptions.php',
145: 'memcachedstorage' =>
'/Caching/MemcachedStorage.php',
146: 'multirouter' =>
'/Application/MultiRouter.php',
147: 'multiselectbox' =>
'/Forms/Controls/MultiSelectBox.php',
148: 'netteloader' =>
'/Loaders/NetteLoader.php',
149: 'notimplementedexception' =>
'/exceptions.php',
150: 'notsupportedexception' =>
'/exceptions.php',
151: 'object' =>
'/Object.php',
152: 'objectmixin' =>
'/ObjectMixin.php',
153: 'paginator' =>
'/Paginator.php',
154: 'permission' =>
'/Security/Permission.php',
155: 'presenter' =>
'/Application/Presenter.php',
156: 'presentercomponent' =>
'/Application/PresenterComponent.php',
157: 'presenterhelpers' =>
'/Application/PresenterHelpers.php',
158: 'presenterloader' =>
'/Application/PresenterLoader.php',
159: 'presenterrequest' =>
'/Application/PresenterRequest.php',
160: 'radiolist' =>
'/Forms/Controls/RadioList.php',
161: 'recursivecomponentiterator' =>
'/ComponentContainer.php',
162: 'recursivehtmliterator' =>
'/Web/Html.php',
163: 'redirectingexception' =>
'/Application/RedirectingException.php',
164: 'repeatercontrol' =>
'/Forms/Controls/RepeaterControl.php',
165: 'robotloader' =>
'/Loaders/RobotLoader.php',
166: 'route' =>
'/Application/Route.php',
167: 'rule' =>
'/Forms/Rule.php',
168: 'rules' =>
'/Forms/Rules.php',
169: 'safestream' =>
'/IO/SafeStream.php',
170: 'selectbox' =>
'/Forms/Controls/SelectBox.php',
171: 'servicelocator' =>
'/ServiceLocator.php',
172: 'session' =>
'/Web/Session.php',
173: 'sessionnamespace' =>
'/Web/SessionNamespace.php',
174: 'set' =>
'/Collections/Set.php',
175: 'simpleauthenticator' =>
'/Security/SimpleAuthenticator.php',
176: 'simpleloader' =>
'/Loaders/SimpleLoader.php',
177: 'simplerouter' =>
'/Application/SimpleRouter.php',
178: 'smartcachingiterator' =>
'/SmartCachingIterator.php',
179: 'snippethelper' =>
'/Templates/Filters/SnippetHelper.php',
180: 'string' =>
'/String.php',
181: 'submitbutton' =>
'/Forms/Controls/SubmitButton.php',
182: 'template' =>
'/Templates/Template.php',
183: 'templatecachestorage' =>
'/Templates/TemplateCacheStorage.php',
184: 'templatefilters' =>
'/Templates/Filters/TemplateFilters.php',
185: 'templatehelpers' =>
'/Templates/Filters/TemplateHelpers.php',
186: 'terminateexception' =>
'/Application/TerminateException.php',
187: 'textarea' =>
'/Forms/Controls/TextArea.php',
188: 'textbase' =>
'/Forms/Controls/TextBase.php',
189: 'textinput' =>
'/Forms/Controls/TextInput.php',
190: 'tools' =>
'/Tools.php',
191: 'uri' =>
'/Web/Uri.php',
192: 'uriscript' =>
'/Web/UriScript.php',
193: 'user' =>
'/Web/User.php',
194: 'userclientscript' =>
'/Forms/Renderers/UserClientScript.php',
200: * Returns singleton instance with lazy instantiation.
201: * @return NetteLoader
205: if (self::$instance ===
NULL) {
206: self::$instance =
new self;
208: return self::$instance;
214: * Handles autoloading of classes or interfaces.
220: $type =
strtolower($type);