Namespaces

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • None
  • PHP

Classes

  • AutoLoader
  • NetteLoader
  • RobotLoader
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: /**
  4:  * This file is part of the Nette Framework (http://nette.org)
  5:  *
  6:  * Copyright (c) 2004, 2011 David Grudl (http://davidgrudl.com)
  7:  *
  8:  * For the full copyright and license information, please view
  9:  * the file license.txt that was distributed with this source code.
 10:  */
 11: 
 12: namespace Nette\Loaders;
 13: 
 14: use Nette;
 15: 
 16: 
 17: 
 18: /**
 19:  * Nette auto loader is responsible for loading Nette classes and interfaces.
 20:  *
 21:  * @author     David Grudl
 22:  */
 23: class NetteLoader extends AutoLoader
 24: {
 25:     /** @var NetteLoader */
 26:     private static $instance;
 27: 
 28:     /** @var array */
 29:     public $list = array(
 30:         'nette\application\abortexception' => '/Application/exceptions.php',
 31:         'nette\application\application' => '/Application/Application.php',
 32:         'nette\application\applicationexception' => '/Application/exceptions.php',
 33:         'nette\application\badrequestexception' => '/Application/exceptions.php',
 34:         'nette\application\diagnostics\routingpanel' => '/Application/Diagnostics/RoutingPanel.php',
 35:         'nette\application\forbiddenrequestexception' => '/Application/exceptions.php',
 36:         'nette\application\invalidpresenterexception' => '/Application/exceptions.php',
 37:         'nette\application\ipresenter' => '/Application/IPresenter.php',
 38:         'nette\application\ipresenterfactory' => '/Application/IPresenterFactory.php',
 39:         'nette\application\iresponse' => '/Application/IResponse.php',
 40:         'nette\application\irouter' => '/Application/IRouter.php',
 41:         'nette\application\presenterfactory' => '/Application/PresenterFactory.php',
 42:         'nette\application\request' => '/Application/Request.php',
 43:         'nette\application\responses\fileresponse' => '/Application/Responses/FileResponse.php',
 44:         'nette\application\responses\forwardresponse' => '/Application/Responses/ForwardResponse.php',
 45:         'nette\application\responses\jsonresponse' => '/Application/Responses/JsonResponse.php',
 46:         'nette\application\responses\redirectresponse' => '/Application/Responses/RedirectResponse.php',
 47:         'nette\application\responses\textresponse' => '/Application/Responses/TextResponse.php',
 48:         'nette\application\routers\clirouter' => '/Application/Routers/CliRouter.php',
 49:         'nette\application\routers\route' => '/Application/Routers/Route.php',
 50:         'nette\application\routers\routelist' => '/Application/Routers/RouteList.php',
 51:         'nette\application\routers\simplerouter' => '/Application/Routers/SimpleRouter.php',
 52:         'nette\application\ui\badsignalexception' => '/Application/UI/BadSignalException.php',
 53:         'nette\application\ui\control' => '/Application/UI/Control.php',
 54:         'nette\application\ui\form' => '/Application/UI/Form.php',
 55:         'nette\application\ui\invalidlinkexception' => '/Application/UI/InvalidLinkException.php',
 56:         'nette\application\ui\ipartiallyrenderable' => '/Application/UI/IPartiallyRenderable.php',
 57:         'nette\application\ui\irenderable' => '/Application/UI/IRenderable.php',
 58:         'nette\application\ui\isignalreceiver' => '/Application/UI/ISignalReceiver.php',
 59:         'nette\application\ui\istatepersistent' => '/Application/UI/IStatePersistent.php',
 60:         'nette\application\ui\link' => '/Application/UI/Link.php',
 61:         'nette\application\ui\presenter' => '/Application/UI/Presenter.php',
 62:         'nette\application\ui\presentercomponent' => '/Application/UI/PresenterComponent.php',
 63:         'nette\application\ui\presentercomponentreflection' => '/Application/UI/PresenterComponentReflection.php',
 64:         'nette\argumentoutofrangeexception' => '/common/exceptions.php',
 65:         'nette\arrayhash' => '/common/ArrayHash.php',
 66:         'nette\arraylist' => '/common/ArrayList.php',
 67:         'nette\caching\cache' => '/Caching/Cache.php',
 68:         'nette\caching\istorage' => '/Caching/IStorage.php',
 69:         'nette\caching\outputhelper' => '/Caching/OutputHelper.php',
 70:         'nette\caching\storages\devnullstorage' => '/Caching/Storages/DevNullStorage.php',
 71:         'nette\caching\storages\filejournal' => '/Caching/Storages/FileJournal.php',
 72:         'nette\caching\storages\filestorage' => '/Caching/Storages/FileStorage.php',
 73:         'nette\caching\storages\ijournal' => '/Caching/Storages/IJournal.php',
 74:         'nette\caching\storages\memcachedstorage' => '/Caching/Storages/MemcachedStorage.php',
 75:         'nette\caching\storages\memorystorage' => '/Caching/Storages/MemoryStorage.php',
 76:         'nette\caching\storages\phpfilestorage' => '/Caching/Storages/PhpFileStorage.php',
 77:         'nette\callback' => '/common/Callback.php',
 78:         'nette\componentmodel\component' => '/ComponentModel/Component.php',
 79:         'nette\componentmodel\container' => '/ComponentModel/Container.php',
 80:         'nette\componentmodel\icomponent' => '/ComponentModel/IComponent.php',
 81:         'nette\componentmodel\icontainer' => '/ComponentModel/IContainer.php',
 82:         'nette\componentmodel\recursivecomponentiterator' => '/ComponentModel/RecursiveComponentIterator.php',
 83:         'nette\config\config' => '/Config/Config.php',
 84:         'nette\config\iadapter' => '/Config/IAdapter.php',
 85:         'nette\config\iniadapter' => '/Config/IniAdapter.php',
 86:         'nette\config\neonadapter' => '/Config/NeonAdapter.php',
 87:         'nette\configurator' => '/common/Configurator.php',
 88:         'nette\database\connection' => '/Database/Connection.php',
 89:         'nette\database\diagnostics\connectionpanel' => '/Database/Diagnostics/ConnectionPanel.php',
 90:         'nette\database\drivers\mssqldriver' => '/Database/Drivers/MsSqlDriver.php',
 91:         'nette\database\drivers\mysqldriver' => '/Database/Drivers/MySqlDriver.php',
 92:         'nette\database\drivers\ocidriver' => '/Database/Drivers/OciDriver.php',
 93:         'nette\database\drivers\odbcdriver' => '/Database/Drivers/OdbcDriver.php',
 94:         'nette\database\drivers\pgsqldriver' => '/Database/Drivers/PgSqlDriver.php',
 95:         'nette\database\drivers\sqlite2driver' => '/Database/Drivers/Sqlite2Driver.php',
 96:         'nette\database\drivers\sqlitedriver' => '/Database/Drivers/SqliteDriver.php',
 97:         'nette\database\isupplementaldriver' => '/Database/ISupplementalDriver.php',
 98:         'nette\database\reflection\databasereflection' => '/Database/Reflection/DatabaseReflection.php',
 99:         'nette\database\row' => '/Database/Row.php',
100:         'nette\database\sqlliteral' => '/Database/SqlLiteral.php',
101:         'nette\database\sqlpreprocessor' => '/Database/SqlPreprocessor.php',
102:         'nette\database\statement' => '/Database/Statement.php',
103:         'nette\database\table\activerow' => '/Database/Table/ActiveRow.php',
104:         'nette\database\table\groupedselection' => '/Database/Table/GroupedSelection.php',
105:         'nette\database\table\selection' => '/Database/Table/Selection.php',
106:         'nette\datetime' => '/common/DateTime.php',
107:         'nette\deprecatedexception' => '/common/exceptions.php',
108:         'nette\di\ambiguousserviceexception' => '/DI/exceptions.php',
109:         'nette\di\container' => '/DI/Container.php',
110:         'nette\di\containerbuilder' => '/DI/ContainerBuilder.php',
111:         'nette\di\icontainer' => '/DI/IContainer.php',
112:         'nette\di\iservicebuilder' => '/DI/IServiceBuilder.php',
113:         'nette\di\missingserviceexception' => '/DI/exceptions.php',
114:         'nette\di\servicebuilder' => '/DI/ServiceBuilder.php',
115:         'nette\diagnostics\bar' => '/Diagnostics/Bar.php',
116:         'nette\diagnostics\bluescreen' => '/Diagnostics/BlueScreen.php',
117:         'nette\diagnostics\debugger' => '/Diagnostics/Debugger.php',
118:         'nette\diagnostics\defaultbarpanel' => '/Diagnostics/DefaultBarPanel.php',
119:         'nette\diagnostics\firelogger' => '/Diagnostics/FireLogger.php',
120:         'nette\diagnostics\helpers' => '/Diagnostics/Helpers.php',
121:         'nette\diagnostics\ibarpanel' => '/Diagnostics/IBarPanel.php',
122:         'nette\diagnostics\logger' => '/Diagnostics/Logger.php',
123:         'nette\directorynotfoundexception' => '/common/exceptions.php',
124:         'nette\environment' => '/common/Environment.php',
125:         'nette\fatalerrorexception' => '/common/exceptions.php',
126:         'nette\filenotfoundexception' => '/common/exceptions.php',
127:         'nette\forms\container' => '/Forms/Container.php',
128:         'nette\forms\controlgroup' => '/Forms/ControlGroup.php',
129:         'nette\forms\controls\basecontrol' => '/Forms/Controls/BaseControl.php',
130:         'nette\forms\controls\button' => '/Forms/Controls/Button.php',
131:         'nette\forms\controls\checkbox' => '/Forms/Controls/Checkbox.php',
132:         'nette\forms\controls\hiddenfield' => '/Forms/Controls/HiddenField.php',
133:         'nette\forms\controls\imagebutton' => '/Forms/Controls/ImageButton.php',
134:         'nette\forms\controls\multiselectbox' => '/Forms/Controls/MultiSelectBox.php',
135:         'nette\forms\controls\radiolist' => '/Forms/Controls/RadioList.php',
136:         'nette\forms\controls\selectbox' => '/Forms/Controls/SelectBox.php',
137:         'nette\forms\controls\submitbutton' => '/Forms/Controls/SubmitButton.php',
138:         'nette\forms\controls\textarea' => '/Forms/Controls/TextArea.php',
139:         'nette\forms\controls\textbase' => '/Forms/Controls/TextBase.php',
140:         'nette\forms\controls\textinput' => '/Forms/Controls/TextInput.php',
141:         'nette\forms\controls\uploadcontrol' => '/Forms/Controls/UploadControl.php',
142:         'nette\forms\form' => '/Forms/Form.php',
143:         'nette\forms\icontrol' => '/Forms/IControl.php',
144:         'nette\forms\iformrenderer' => '/Forms/IFormRenderer.php',
145:         'nette\forms\isubmittercontrol' => '/Forms/ISubmitterControl.php',
146:         'nette\forms\rendering\defaultformrenderer' => '/Forms/Rendering/DefaultFormRenderer.php',
147:         'nette\forms\rule' => '/Forms/Rule.php',
148:         'nette\forms\rules' => '/Forms/Rules.php',
149:         'nette\framework' => '/common/Framework.php',
150:         'nette\freezableobject' => '/common/FreezableObject.php',
151:         'nette\http\context' => '/Http/Context.php',
152:         'nette\http\fileupload' => '/Http/FileUpload.php',
153:         'nette\http\irequest' => '/Http/IRequest.php',
154:         'nette\http\iresponse' => '/Http/IResponse.php',
155:         'nette\http\isessionstorage' => '/Http/ISessionStorage.php',
156:         'nette\http\iuser' => '/Http/IUser.php',
157:         'nette\http\request' => '/Http/Request.php',
158:         'nette\http\requestfactory' => '/Http/RequestFactory.php',
159:         'nette\http\response' => '/Http/Response.php',
160:         'nette\http\session' => '/Http/Session.php',
161:         'nette\http\sessionsection' => '/Http/SessionSection.php',
162:         'nette\http\url' => '/Http/Url.php',
163:         'nette\http\urlscript' => '/Http/UrlScript.php',
164:         'nette\http\user' => '/Http/User.php',
165:         'nette\ifreezable' => '/common/IFreezable.php',
166:         'nette\image' => '/common/Image.php',
167:         'nette\invalidargumentexception' => '/common/exceptions.php',
168:         'nette\invalidstateexception' => '/common/exceptions.php',
169:         'nette\ioexception' => '/common/exceptions.php',
170:         'nette\iterators\cachingiterator' => '/Iterators/CachingIterator.php',
171:         'nette\iterators\filter' => '/Iterators/Filter.php',
172:         'nette\iterators\instancefilter' => '/Iterators/InstanceFilter.php',
173:         'nette\iterators\mapper' => '/Iterators/Mapper.php',
174:         'nette\iterators\recursivefilter' => '/Iterators/RecursiveFilter.php',
175:         'nette\iterators\recursor' => '/Iterators/Recursor.php',
176:         'nette\latte\engine' => '/Latte/Engine.php',
177:         'nette\latte\htmlnode' => '/Latte/HtmlNode.php',
178:         'nette\latte\imacro' => '/Latte/IMacro.php',
179:         'nette\latte\macronode' => '/Latte/MacroNode.php',
180:         'nette\latte\macros\cachemacro' => '/Latte/Macros/CacheMacro.php',
181:         'nette\latte\macros\coremacros' => '/Latte/Macros/CoreMacros.php',
182:         'nette\latte\macros\formmacros' => '/Latte/Macros/FormMacros.php',
183:         'nette\latte\macros\macroset' => '/Latte/Macros/MacroSet.php',
184:         'nette\latte\macros\uimacros' => '/Latte/Macros/UIMacros.php',
185:         'nette\latte\macrotokenizer' => '/Latte/MacroTokenizer.php',
186:         'nette\latte\parseexception' => '/Latte/ParseException.php',
187:         'nette\latte\parser' => '/Latte/Parser.php',
188:         'nette\latte\phpwriter' => '/Latte/PhpWriter.php',
189:         'nette\loaders\autoloader' => '/Loaders/AutoLoader.php',
190:         'nette\loaders\netteloader' => '/Loaders/NetteLoader.php',
191:         'nette\loaders\robotloader' => '/Loaders/RobotLoader.php',
192:         'nette\localization\itranslator' => '/Localization/ITranslator.php',
193:         'nette\mail\imailer' => '/Mail/IMailer.php',
194:         'nette\mail\message' => '/Mail/Message.php',
195:         'nette\mail\mimepart' => '/Mail/MimePart.php',
196:         'nette\mail\sendmailmailer' => '/Mail/SendmailMailer.php',
197:         'nette\mail\smtpexception' => '/Mail/SmtpMailer.php',
198:         'nette\mail\smtpmailer' => '/Mail/SmtpMailer.php',
199:         'nette\memberaccessexception' => '/common/exceptions.php',
200:         'nette\notimplementedexception' => '/common/exceptions.php',
201:         'nette\notsupportedexception' => '/common/exceptions.php',
202:         'nette\object' => '/common/Object.php',
203:         'nette\objectmixin' => '/common/ObjectMixin.php',
204:         'nette\outofrangeexception' => '/common/exceptions.php',
205:         'nette\reflection\annotation' => '/Reflection/Annotation.php',
206:         'nette\reflection\annotationsparser' => '/Reflection/AnnotationsParser.php',
207:         'nette\reflection\classtype' => '/Reflection/ClassType.php',
208:         'nette\reflection\extension' => '/Reflection/Extension.php',
209:         'nette\reflection\globalfunction' => '/Reflection/GlobalFunction.php',
210:         'nette\reflection\iannotation' => '/Reflection/IAnnotation.php',
211:         'nette\reflection\method' => '/Reflection/Method.php',
212:         'nette\reflection\parameter' => '/Reflection/Parameter.php',
213:         'nette\reflection\property' => '/Reflection/Property.php',
214:         'nette\security\authenticationexception' => '/Security/AuthenticationException.php',
215:         'nette\security\iauthenticator' => '/Security/IAuthenticator.php',
216:         'nette\security\iauthorizator' => '/Security/IAuthorizator.php',
217:         'nette\security\identity' => '/Security/Identity.php',
218:         'nette\security\iidentity' => '/Security/IIdentity.php',
219:         'nette\security\iresource' => '/Security/IResource.php',
220:         'nette\security\irole' => '/Security/IRole.php',
221:         'nette\security\permission' => '/Security/Permission.php',
222:         'nette\security\simpleauthenticator' => '/Security/SimpleAuthenticator.php',
223:         'nette\staticclassexception' => '/common/exceptions.php',
224:         'nette\templating\defaulthelpers' => '/Templating/DefaultHelpers.php',
225:         'nette\templating\filetemplate' => '/Templating/FileTemplate.php',
226:         'nette\templating\filterexception' => '/Templating/FilterException.php',
227:         'nette\templating\ifiletemplate' => '/Templating/IFileTemplate.php',
228:         'nette\templating\itemplate' => '/Templating/ITemplate.php',
229:         'nette\templating\template' => '/Templating/Template.php',
230:         'nette\unexpectedvalueexception' => '/common/exceptions.php',
231:         'nette\unknownimagefileexception' => '/common/Image.php',
232:         'nette\utils\arrays' => '/Utils/Arrays.php',
233:         'nette\utils\criticalsection' => '/Utils/CriticalSection.php',
234:         'nette\utils\finder' => '/Utils/Finder.php',
235:         'nette\utils\html' => '/Utils/Html.php',
236:         'nette\utils\json' => '/Utils/Json.php',
237:         'nette\utils\jsonexception' => '/Utils/Json.php',
238:         'nette\utils\limitedscope' => '/Utils/LimitedScope.php',
239:         'nette\utils\mimetypedetector' => '/Utils/MimeTypeDetector.php',
240:         'nette\utils\neon' => '/Utils/Neon.php',
241:         'nette\utils\neonexception' => '/Utils/Neon.php',
242:         'nette\utils\paginator' => '/Utils/Paginator.php',
243:         'nette\utils\regexpexception' => '/Utils/Strings.php',
244:         'nette\utils\safestream' => '/Utils/SafeStream.php',
245:         'nette\utils\strings' => '/Utils/Strings.php',
246:         'nette\utils\tokenizer' => '/Utils/Tokenizer.php',
247:         'nette\utils\tokenizerexception' => '/Utils/Tokenizer.php',
248:         'nettemodule\micropresenter' => '/Application/MicroPresenter.php',
249:     );
250: 
251: 
252: 
253:     /**
254:      * Returns singleton instance with lazy instantiation.
255:      * @return NetteLoader
256:      */
257:     public static function getInstance()
258:     {
259:         if (self::$instance === NULL) {
260:             self::$instance = new static;
261:         }
262:         return self::$instance;
263:     }
264: 
265: 
266: 
267:     /**
268:      * Handles autoloading of classes or interfaces.
269:      * @param  string
270:      * @return void
271:      */
272:     public function tryLoad($type)
273:     {
274:         $type = ltrim(strtolower($type), '\\');
275:         if (isset($this->list[$type])) {
276:             Nette\Utils\LimitedScope::load(NETTE_DIR . $this->list[$type]);
277:             self::$count++;
278:         }
279:     }
280: 
281: }
282: 
Nette Framework 2.0beta1 API API documentation generated by ApiGen 2.3.0