Created
August 29, 2011 19:13
-
-
Save Majkl578/1179151 to your computer and use it in GitHub Desktop.
Class aliases for migrating from Nette for PHP 5.2 to 5.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Class aliases for migrating from Nette for PHP 5.2 to 5.3 | |
| * @author Michael Moravec | |
| */ | |
| $aliases = array( | |
| 'application' => 'nette\application\application', | |
| 'routingdebugger' => 'nette\application\diagnostics\routingpanel', | |
| 'ipresenter' => 'nette\application\ipresenter', | |
| 'ipresenterfactory' => 'nette\application\ipresenterfactory', | |
| 'ipresenterresponse' => 'nette\application\iresponse', | |
| 'irouter' => 'nette\application\irouter', | |
| 'micropresenter' => 'nettemodule\micropresenter', | |
| 'presenterfactory' => 'nette\application\presenterfactory', | |
| 'presenterrequest' => 'nette\application\request', | |
| 'fileresponse' => 'nette\application\responses\fileresponse', | |
| 'forwardresponse' => 'nette\application\responses\forwardresponse', | |
| 'jsonresponse' => 'nette\application\responses\jsonresponse', | |
| 'redirectresponse' => 'nette\application\responses\redirectresponse', | |
| 'textresponse' => 'nette\application\responses\textresponse', | |
| 'clirouter' => 'nette\application\routers\clirouter', | |
| 'route' => 'nette\application\routers\route', | |
| 'routelist' => 'nette\application\routers\routelist', | |
| 'simplerouter' => 'nette\application\routers\simplerouter', | |
| 'badsignalexception' => 'nette\application\ui\badsignalexception', | |
| 'control' => 'nette\application\ui\control', | |
| 'appform' => 'nette\application\ui\form', | |
| 'ipartiallyrenderable' => 'nette\application\ui\ipartiallyrenderable', | |
| 'irenderable' => 'nette\application\ui\irenderable', | |
| 'isignalreceiver' => 'nette\application\ui\isignalreceiver', | |
| 'istatepersistent' => 'nette\application\ui\istatepersistent', | |
| 'invalidlinkexception' => 'nette\application\ui\invalidlinkexception', | |
| 'link' => 'nette\application\ui\link', | |
| 'presenter' => 'nette\application\ui\presenter', | |
| 'presentercomponent' => 'nette\application\ui\presentercomponent', | |
| 'presentercomponentreflection' => 'nette\application\ui\presentercomponentreflection', | |
| 'abortexception' => 'nette\application\applicationexception', | |
| 'forbiddenrequestexception' => 'nette\application\abortexception', | |
| 'invalidpresenterexception' => 'nette\application\badrequestexception', | |
| 'badrequestexception' => 'nette\application\forbiddenrequestexception', | |
| 'applicationexception' => 'nette\application\invalidpresenterexception', | |
| 'cache' => 'nette\caching\cache', | |
| 'icachestorage' => 'nette\caching\istorage', | |
| 'cachinghelper' => 'nette\caching\outputhelper', | |
| 'devnullstorage' => 'nette\caching\storages\devnullstorage', | |
| 'filejournal' => 'nette\caching\storages\filejournal', | |
| 'filestorage' => 'nette\caching\storages\filestorage', | |
| 'icachejournal' => 'nette\caching\storages\ijournal', | |
| 'memcachedstorage' => 'nette\caching\storages\memcachedstorage', | |
| 'memorystorage' => 'nette\caching\storages\memorystorage', | |
| 'phpfilestorage' => 'nette\caching\storages\phpfilestorage', | |
| 'component' => 'nette\componentmodel\component', | |
| 'componentcontainer' => 'nette\componentmodel\container', | |
| 'icomponent' => 'nette\componentmodel\icomponent', | |
| 'icomponentcontainer' => 'nette\componentmodel\icontainer', | |
| 'recursivecomponentiterator' => 'nette\componentmodel\recursivecomponentiterator', | |
| 'config' => 'nette\config\config', | |
| 'iconfigadapter' => 'nette\config\iadapter', | |
| 'configadapterini' => 'nette\config\iniadapter', | |
| 'configadapterneon' => 'nette\config\neonadapter', | |
| 'dicontainer' => 'nette\di\container', | |
| 'containerbuilder' => 'nette\di\containerbuilder', | |
| 'idicontainer' => 'nette\di\icontainer', | |
| 'iservicebuilder' => 'nette\di\iservicebuilder', | |
| 'servicebuilder' => 'nette\di\servicebuilder', | |
| 'missingserviceexception' => 'nette\di\missingserviceexception', | |
| 'ambiguousserviceexception' => 'nette\di\ambiguousserviceexception', | |
| 'connection' => 'nette\database\connection', | |
| 'databasepanel' => 'nette\database\diagnostics\connectionpanel', | |
| 'mssqldriver' => 'nette\database\drivers\mssqldriver', | |
| 'mysqldriver' => 'nette\database\drivers\mysqldriver', | |
| 'ocidriver' => 'nette\database\drivers\ocidriver', | |
| 'odbcdriver' => 'nette\database\drivers\odbcdriver', | |
| 'pgsqldriver' => 'nette\database\drivers\pgsqldriver', | |
| 'sqlite2driver' => 'nette\database\drivers\sqlite2driver', | |
| 'sqlitedriver' => 'nette\database\drivers\sqlitedriver', | |
| 'isupplementaldriver' => 'nette\database\isupplementaldriver', | |
| 'databasereflection' => 'nette\database\reflection\databasereflection', | |
| 'row' => 'nette\database\row', | |
| 'sqlliteral' => 'nette\database\sqlliteral', | |
| 'sqlpreprocessor' => 'nette\database\sqlpreprocessor', | |
| 'statement' => 'nette\database\statement', | |
| 'tablerow' => 'nette\database\table\activerow', | |
| 'groupedtableselection' => 'nette\database\table\groupedselection', | |
| 'tableselection' => 'nette\database\table\selection', | |
| 'debugbar' => 'nette\diagnostics\bar', | |
| 'debugbluescreen' => 'nette\diagnostics\bluescreen', | |
| 'debugger' => 'nette\diagnostics\debugger', | |
| 'defaultbarpanel' => 'nette\diagnostics\defaultbarpanel', | |
| 'firelogger' => 'nette\diagnostics\firelogger', | |
| 'debughelpers' => 'nette\diagnostics\helpers', | |
| 'ibarpanel' => 'nette\diagnostics\ibarpanel', | |
| 'logger' => 'nette\diagnostics\logger', | |
| 'formcontainer' => 'nette\forms\container', | |
| 'formgroup' => 'nette\forms\controlgroup', | |
| 'formcontrol' => 'nette\forms\controls\basecontrol', | |
| 'button' => 'nette\forms\controls\button', | |
| 'checkbox' => 'nette\forms\controls\checkbox', | |
| 'hiddenfield' => 'nette\forms\controls\hiddenfield', | |
| 'imagebutton' => 'nette\forms\controls\imagebutton', | |
| 'multiselectbox' => 'nette\forms\controls\multiselectbox', | |
| 'radiolist' => 'nette\forms\controls\radiolist', | |
| 'selectbox' => 'nette\forms\controls\selectbox', | |
| 'submitbutton' => 'nette\forms\controls\submitbutton', | |
| 'textarea' => 'nette\forms\controls\textarea', | |
| 'textbase' => 'nette\forms\controls\textbase', | |
| 'textinput' => 'nette\forms\controls\textinput', | |
| 'uploadcontrol' => 'nette\forms\controls\uploadcontrol', | |
| 'form' => 'nette\forms\form', | |
| 'iformcontrol' => 'nette\forms\icontrol', | |
| 'iformrenderer' => 'nette\forms\iformrenderer', | |
| 'isubmittercontrol' => 'nette\forms\isubmittercontrol', | |
| 'defaultformrenderer' => 'nette\forms\rendering\defaultformrenderer', | |
| 'rule' => 'nette\forms\rule', | |
| 'rules' => 'nette\forms\rules', | |
| 'httpcontext' => 'nette\http\context', | |
| 'httpuploadedfile' => 'nette\http\fileupload', | |
| 'ihttprequest' => 'nette\http\irequest', | |
| 'ihttpresponse' => 'nette\http\iresponse', | |
| 'isessionstorage' => 'nette\http\isessionstorage', | |
| 'iuser' => 'nette\http\iuser', | |
| 'httprequest' => 'nette\http\request', | |
| 'httprequestfactory' => 'nette\http\requestfactory', | |
| 'httpresponse' => 'nette\http\response', | |
| 'session' => 'nette\http\session', | |
| 'sessionsection' => 'nette\http\sessionsection', | |
| 'url' => 'nette\http\url', | |
| 'urlscript' => 'nette\http\urlscript', | |
| 'user' => 'nette\http\user', | |
| 'smartcachingiterator' => 'nette\iterators\cachingiterator', | |
| 'callbackfilteriterator' => 'nette\iterators\filter', | |
| 'instancefilteriterator' => 'nette\iterators\instancefilter', | |
| 'mapiterator' => 'nette\iterators\mapper', | |
| 'recursivecallbackfilteriterator' => 'nette\iterators\recursivefilter', | |
| 'genericrecursiveiterator' => 'nette\iterators\recursor', | |
| 'lattefilter' => 'nette\latte\engine', | |
| 'htmlnode' => 'nette\latte\htmlnode', | |
| 'imacro' => 'nette\latte\imacro', | |
| 'macronode' => 'nette\latte\macronode', | |
| 'macrotokenizer' => 'nette\latte\macrotokenizer', | |
| 'cachemacro' => 'nette\latte\macros\cachemacro', | |
| 'coremacros' => 'nette\latte\macros\coremacros', | |
| 'formmacros' => 'nette\latte\macros\formmacros', | |
| 'macroset' => 'nette\latte\macros\macroset', | |
| 'uimacros' => 'nette\latte\macros\uimacros', | |
| 'latteexception' => 'nette\latte\parseexception', | |
| 'parser' => 'nette\latte\parser', | |
| 'phpwriter' => 'nette\latte\phpwriter', | |
| 'autoloader' => 'nette\loaders\autoloader', | |
| 'netteloader' => 'nette\loaders\netteloader', | |
| 'robotloader' => 'nette\loaders\robotloader', | |
| 'itranslator' => 'nette\localization\itranslator', | |
| 'imailer' => 'nette\mail\imailer', | |
| 'mail' => 'nette\mail\message', | |
| 'mailmimepart' => 'nette\mail\mimepart', | |
| 'sendmailmailer' => 'nette\mail\sendmailmailer', | |
| 'smtpexception' => 'nette\mail\smtpexception', | |
| 'smtpmailer' => 'nette\mail\smtpmailer', | |
| 'annotation' => 'nette\reflection\annotation', | |
| 'annotationsparser' => 'nette\reflection\annotationsparser', | |
| 'classreflection' => 'nette\reflection\classtype', | |
| 'extensionreflection' => 'nette\reflection\extension', | |
| 'functionreflection' => 'nette\reflection\globalfunction', | |
| 'iannotation' => 'nette\reflection\iannotation', | |
| 'methodreflection' => 'nette\reflection\method', | |
| 'parameterreflection' => 'nette\reflection\parameter', | |
| 'propertyreflection' => 'nette\reflection\property', | |
| 'authenticationexception' => 'nette\security\authenticationexception', | |
| 'iauthenticator' => 'nette\security\iauthenticator', | |
| 'iauthorizator' => 'nette\security\iauthorizator', | |
| 'iidentity' => 'nette\security\iidentity', | |
| 'iresource' => 'nette\security\iresource', | |
| 'irole' => 'nette\security\irole', | |
| 'identity' => 'nette\security\identity', | |
| 'permission' => 'nette\security\permission', | |
| 'simpleauthenticator' => 'nette\security\simpleauthenticator', | |
| 'templatehelpers' => 'nette\templating\defaulthelpers', | |
| 'filetemplate' => 'nette\templating\filetemplate', | |
| 'templateexception' => 'nette\templating\filterexception', | |
| 'ifiletemplate' => 'nette\templating\ifiletemplate', | |
| 'itemplate' => 'nette\templating\itemplate', | |
| 'template' => 'nette\templating\template', | |
| 'arrays' => 'nette\utils\arrays', | |
| 'criticalsection' => 'nette\utils\criticalsection', | |
| 'finder' => 'nette\utils\finder', | |
| 'html' => 'nette\utils\html', | |
| 'jsonexception' => 'nette\utils\json', | |
| 'json' => 'nette\utils\jsonexception', | |
| 'limitedscope' => 'nette\utils\limitedscope', | |
| 'mimetypedetector' => 'nette\utils\mimetypedetector', | |
| 'neon' => 'nette\utils\neonexception', | |
| 'neonexception' => 'nette\utils\neon', | |
| 'paginator' => 'nette\utils\paginator', | |
| 'safestream' => 'nette\utils\safestream', | |
| 'regexpexception' => 'nette\utils\regexpexception', | |
| 'strings' => 'nette\utils\strings', | |
| 'tokenizer' => 'nette\utils\tokenizer', | |
| 'tokenizerexception' => 'nette\utils\tokenizerexception', | |
| 'arrayhash' => 'nette\arrayhash', | |
| 'arraylist' => 'nette\arraylist', | |
| 'callback' => 'nette\callback', | |
| 'configurator' => 'nette\configurator', | |
| 'datetime53' => 'nette\datetime', | |
| 'environment' => 'nette\environment', | |
| 'framework' => 'nette\framework', | |
| 'freezableobject' => 'nette\freezableobject', | |
| 'ifreezable' => 'nette\ifreezable', | |
| 'unknownimagefileexception' => 'nette\image', | |
| 'image' => 'nette\unknownimagefileexception', | |
| 'object' => 'nette\object', | |
| 'objectmixin' => 'nette\objectmixin', | |
| 'notimplementedexception' => 'nette\notimplementedexception', | |
| 'deprecatedexception' => 'nette\deprecatedexception', | |
| 'notsupportedexception' => 'nette\notsupportedexception', | |
| 'directorynotfoundexception' => 'nette\directorynotfoundexception', | |
| 'memberaccessexception' => 'nette\memberaccessexception', | |
| 'filenotfoundexception' => 'nette\filenotfoundexception', | |
| 'argumentoutofrangeexception' => 'nette\argumentoutofrangeexception', | |
| 'fatalerrorexception' => 'nette\fatalerrorexception', | |
| 'invalidstateexception' => 'nette\invalidstateexception', | |
| 'ioexception' => 'nette\ioexception', | |
| 'staticclassexception' => 'nette\staticclassexception', | |
| ); | |
| foreach ($aliases as $old => $new) { | |
| class_alias($new, $old); | |
| //class_alias($new, 'n' . $old); | |
| } | |
| unset($aliases); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment