From 9fd48c2d6c5362209ccd1f3e3c49f1f2738979ad Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 22 Dec 2015 23:05:10 +0100 Subject: [PATCH] Cleanup of duplicated methods ... Well, this stuff needs rewrite to an own class for better encapsulation as sockets are more and more needed. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- docs/TODOs.txt | 265 ++++++++++-------- .../classes/class_BaseFrameworkSystem.php | 169 +---------- 2 files changed, 143 insertions(+), 291 deletions(-) diff --git a/docs/TODOs.txt b/docs/TODOs.txt index 48f5efec..61d9b7a5 100644 --- a/docs/TODOs.txt +++ b/docs/TODOs.txt @@ -1,136 +1,155 @@ -### WARNING: THIS FILE IS AUTO-GENERATED BY ./todo-builder.sh ### +### WARNING: THIS FILE IS AUTO-GENERATED BY ./contrib/todo-builder.sh ### ### DO NOT EDIT THIS FILE. ### -./inc/classes.php:10: * @todo Minimize these includes -./inc/classes/exceptions/main/class_MissingMethodException.php:13: * @todo Try to rewrite user/guest login classes and mark this exception as deprecated -./inc/classes/exceptions/main/class_NoConfigEntryException.php:10: * @todo Rename this class to NoFoundEntryException -./inc/classes/interfaces/class_FrameworkInterface.php:11: * @todo Find a better name for this interface -./inc/classes/interfaces/criteria/extended/class_LocalSearchCriteria.php:30: * @todo Find a nice casting here. (int) allows until and including 32766. -./inc/classes/interfaces/criteria/extended/class_LocalSearchCriteria.php:54: * @todo Find a nice casting here. (int) allows until and including 32766. -./inc/classes/main/class_BaseFrameworkSystem.php:1953: * @todo Write a logging mechanism for productive mode -./inc/classes/main/class_BaseFrameworkSystem.php:1968: // @TODO Finish this part! -./inc/classes/main/class_BaseFrameworkSystem.php:245: // @todo Try to clean these constants up -./inc/classes/main/class_BaseFrameworkSystem.php:470: // @TODO __CLASS__ does always return BaseFrameworkSystem but not the extending (=child) class -./inc/classes/main/class_BaseFrameworkSystem.php:544: * @todo SearchableResult and UpdateableResult shall have a super interface to use here -./inc/classes/main/commands/web/class_WebLoginAreaCommand.php:64: * @todo Add some stuff here: Some personal data, app/game related data -./inc/classes/main/commands/web/class_WebProblemCommand.php:58: * @todo 0% done -./inc/classes/main/commands/web/class_WebStatusCommand.php:58: * @todo 0% done -./inc/classes/main/console/class_ConsoleTools.php:268: * @todo This should be moved out to an external class, e.g. HttpClient -./inc/classes/main/console/class_ConsoleTools.php:269: * @todo Make IP, host name, port and script name configurable -./inc/classes/main/console/class_ConsoleTools.php:276: // @TODO Add some DNS caching here -./inc/classes/main/console/class_ConsoleTools.php:45: * @todo We should connect this to a caching class to cache DNS requests -./inc/classes/main/console/class_ConsoleTools.php:58: // @TODO Here should the cacher be implemented -./inc/classes/main/controller/console/class_ConsoleDefaultController.php:10: * @todo This controller shall still provide some headlines for sidebars -./inc/classes/main/controller/login/class_WebLoginAreaController.php:40: * @todo Add some morer filters to this controller -./inc/classes/main/controller/web/class_WebConfirmController.php:40: * @todo Add some filters to this controller -./inc/classes/main/controller/web/class_WebDefaultController.php:10: * @todo This controller shall still provide some headlines for sidebars -./inc/classes/main/controller/web/class_WebLoginController.php:41: * @todo Add some filters to this controller -./inc/classes/main/controller/web/class_WebLogoutController.php:10: * @todo This controller shall still provide some headlines for sidebars -./inc/classes/main/controller/web/class_WebLogoutDoneController.php:40: * @todo Add some filters to this controller -./inc/classes/main/controller/web/class_WebProblemController.php:40: * @todo Add some filters to this controller -./inc/classes/main/controller/web/class_WebRegisterController.php:40: * @todo Add some filters to this controller -./inc/classes/main/controller/web/class_WebStatusController.php:10: * @todo This controller shall still provide some headlines for sidebars -./inc/classes/main/criteria/search/class_SearchCriteria.php:102: * @todo Find a nice casting here. (int) allows until and including 32766. -./inc/classes/main/criteria/search/class_SearchCriteria.php:70: * @todo Find a nice casting here. (int) allows until and including 32766. -./inc/classes/main/database/backend/class_CachedLocalFileDatabase.php:327: * @todo Do some checks on the database directory and files here -./inc/classes/main/database/backend/class_CachedLocalFileDatabase.php:616: * @todo Add more generic non-public data for removal -./inc/classes/main/decorator/template/class_XmlRewriterTemplateDecorator.php:427: * @todo Find something useful with this! -./inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php:85: * @todo 0% done -./inc/classes/main/file_directories/class_BaseFile.php:135: * @todo ~10% done? -./inc/classes/main/file_directories/class_BaseFile.php:148: * @todo Handle seekStatus -./inc/classes/main/file_directories/class_BaseFileIo.php:162: * @todo Handle seekStatus -./inc/classes/main/file_directories/directory/class_FrameworkDirectoryPointer.php:68: * @todo Get rid of inConstructor, could be old-lost code. -./inc/classes/main/file_directories/io_stream/class_FileIoStream.php:270: * @todo 0% done -./inc/classes/main/file_directories/io_stream/class_FileIoStream.php:74: * @todo This method needs heavy rewrite -./inc/classes/main/filter/change/class_EmailChangeFilter.php:55: * @todo Implement email change of the user here. HINT: Use the User class! -./inc/classes/main/filter/change/class_PasswordChangeFilter.php:55: * @todo Finished updating user password hash here. HINT: Use the User class again. -./inc/classes/main/filter/news/class_NewsProcessFilter.php:55: * @todo Unfinished stub, add functionality here -./inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php:97: * @todo 0% done -./inc/classes/main/filter/update/class_UserUpdateFilter.php:55: * @todo Add more user updates here -./inc/classes/main/filter/verifier/class_AccountPasswordVerifierFilter.php:57: * @todo Rewrite handling of different password fields -./inc/classes/main/helper/class_BaseHelper.php:173: * @todo Rewrite this method using a helper class for filtering data -./inc/classes/main/helper/class_BaseHelper.php:202: // @TODO Try to log it here -./inc/classes/main/helper/web/forms/class_WebFormHelper.php:102: * @todo Add some unique PIN here to bypass problems with some browser and/or extensions -./inc/classes/main/helper/web/forms/class_WebFormHelper.php:621: * @todo Add checking if sub option is already added -./inc/classes/main/helper/web/forms/class_WebFormHelper.php:649: * @todo Add checking if sub option is already added -./inc/classes/main/helper/web/forms/class_WebFormHelper.php:683: // @TODO We need to log this later -./inc/classes/main/helper/web/forms/class_WebFormHelper.php:852: * @todo Implement check if rules have been changed -./inc/classes/main/helper/web/links/class_WebLinkHelper.php:184: * @todo Completely unimplemented -./inc/classes/main/images/class_BaseImage.php:156: * @todo Find something usefull for this method. -./inc/classes/main/images/class_BaseImage.php:166: * @todo Find something usefull for this method. -./inc/classes/main/images/class_BaseImage.php:176: * @todo Find something usefull for this method. -./inc/classes/main/images/class_BaseImage.php:186: * @todo Find something usefull for this method. -./inc/classes/main/images/class_BaseImage.php:196: * @todo Find something usefull for this method. -./inc/classes/main/images/class_BaseImage.php:215: * @todo Find something usefull for this method. -./inc/classes/main/images/class_BaseImage.php:234: * @todo Find something usefull for this method. -./inc/classes/main/images/class_BaseImage.php:245: * @todo Find something usefull for this method. -./inc/classes/main/images/class_BaseImage.php:255: * @todo Find something usefull for this method. -./inc/classes/main/index/class_BaseIndex.php:135: * @todo Currently the index file is not cached, please implement a memory-handling class and if enough RAM is found, cache the whole index file. -./inc/classes/main/mailer/class_BaseMailer.php:55: // @TODO This needs testing/fixes because the deprecated method -./inc/classes/main/mailer/debug/class_DebugMailer.php:124: * @todo 0% done -./inc/classes/main/menu/class_BaseMenu.php:59: // @TODO Should we log it here? We should, because it will be silently ignored. -./inc/classes/main/output/class_ConsoleOutput.php:56: // @TODO Need to rewrite this to $requestInstance->addHeader() -./inc/classes/main/parser/xml/class_XmlParser.php:79: // @TODO We need to find a fallback solution here -./inc/classes/main/points/class_UserPoints.php:100: * @todo Finish loading part of points -./inc/classes/main/request/console/class_ConsoleRequest.php:106: // @TODO Can't this be 'CONSOLE' ? -./inc/classes/main/request/web/class_HttpRequest.php:10: * @todo Move out the cookie part to a seperate class, e.g. Cookie -./inc/classes/main/response/http/class_HttpResponse.php:77: * @todo Encryption of cookie data not yet supported. -./inc/classes/main/response/http/class_HttpResponse.php:78: * @todo Why are these parameters conflicting? -./inc/classes/main/response/http/class_HttpResponse.php:79: * @todo If the return statement is removed and setcookie() commented out, -./inc/classes/main/response/http/class_HttpResponse.php:80: * @todo this will send only one cookie out, the first one. -./inc/classes/main/response/image/class_ImageResponse.php:88: * @todo Encryption of cookie data not yet supported. -./inc/classes/main/response/image/class_ImageResponse.php:89: * @todo Why are these parameters conflicting? -./inc/classes/main/response/image/class_ImageResponse.php:90: * @todo If the return statement is removed and setcookie() commented out, -./inc/classes/main/response/image/class_ImageResponse.php:91: * @todo this will send only one cookie out, the first one. -./inc/classes/main/result/class_DatabaseResult.php:244: * @todo 0% done -./inc/classes/main/result/class_DatabaseResult.php:398: * @todo Find a caching way without modifying the result array -./inc/classes/main/rng/class_RandomNumberGenerator.php:175: * @todo I had a better random number generator here but now it is somewhere lost :( -./inc/classes/main/rng/class_RandomNumberGenerator.php:97: * @todo Add site key for stronger salt! -./inc/classes/main/stacker/file/class_BaseFileStack.php:147: * @todo Currently the stack file is not cached, please implement a memory-handling class and if enough RAM is found, cache the whole stack file. -./inc/classes/main/stacker/file/class_BaseFileStack.php:309: // @TODO Please implement this, returning FALSE -./inc/classes/main/stacker/file/class_BaseFileStack.php:45: * @todo To hard assertions here, better rewrite them to exceptions -./inc/classes/main/template/class_BaseTemplateEngine.php:1070: // @TODO This silent abort should be logged, maybe. -./inc/classes/main/template/class_BaseTemplateEngine.php:1078: // @TODO Old behaviour, will become obsolete! -./inc/classes/main/template/class_BaseTemplateEngine.php:1081: // @TODO Yet another old way -./inc/classes/main/template/class_BaseTemplateEngine.php:1289: * @todo Make this code some nicer... -./inc/classes/main/template/class_BaseTemplateEngine.php:967: * @todo Unfinished work or don't die here. -./inc/classes/main/template/class_BaseTemplateEngine.php:992: // @TODO Non-string found so we need some deeper analysis... -./inc/classes/main/template/console/class_ConsoleTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./inc/classes/main/template/image/class_ImageTemplateEngine.php:215: * @todo Find something usefull with this! -./inc/classes/main/template/image/class_ImageTemplateEngine.php:235: * @todo Add cache creation here -./inc/classes/main/template/mail/class_MailTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./inc/classes/main/template/mail/class_MailTemplateEngine.php:228: * @todo Add cache creation here -./inc/classes/main/template/mail/class_MailTemplateEngine.php:238: * @todo Should we call back the mailer class here? -./inc/classes/main/template/mail/class_MailTemplateEngine.php:319: * @todo 0% done -./inc/classes/main/template/menu/class_MenuTemplateEngine.php:267: * @todo Find something useful with this! -./inc/classes/main/template/menu/class_MenuTemplateEngine.php:313: * @todo Add cache creation here -./inc/classes/main/user/class_BaseUser.php:308: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem -./inc/classes/main/user/class_BaseUser.php:80: * @todo Find a way of casting here. "(int)" might destroy the user id > 32766 -./inc/classes/main/user/member/class_Member.php:84: * @todo Add more ways over creating user classes -./inc/classes/middleware/compressor/class_CompressorChannel.php:103: // @TODO Is there a configurable fall-back compressor needed, or is NullCompressor okay? -./inc/classes/middleware/debug/class_DebugMiddleware.php:113: // @TODO Initialization phase -./inc/classes/middleware/io/class_FileIoHandler.php:174: * @todo 0% done -./inc/classes/third_party/api/wernisportal/class_WernisApi.php:10: * @todo Out-dated since 0.6-BETA -./inc/config/class_FrameworkConfiguration.php:115: * @todo This method encapsulates a deprecated PHP function and should be deprecated, too. -./inc/config/class_FrameworkConfiguration.php:223: * @todo We have to add some more entries from $_SERVER here +./application/tests/class_ApplicationHelper.php:237: * @todo Nothing to add? +./inc/config/class_FrameworkConfiguration.php:116: * @todo This method encapsulates a deprecated PHP function and should be deprecated, too. +./inc/config/class_FrameworkConfiguration.php:227: * @todo We have to add some more entries from $_SERVER here ./inc/database.php:11: * @todo Minimize these includes ./inc/database.php:51:// @TODO Rewrite this ./inc/includes.php:11: * @todo Minimize these includes ./inc/includes.php:37:// @TODO This makes the core depending on the SPL. But it should be installed anyway. ./inc/includes.php:41:// @TODO Find a nicer OOP-ed way for this ./inc/loader/class_ClassLoader.php:319: /* @TODO: Do not exit here. */ -./inc/output.php:11: * @todo Minimize these includes +./inc/main/classes/class_BaseFrameworkSystem.php:2133: // @TODO Move the constant to e.g. BaseDatabaseResult when there is a non-cached database result available +./inc/main/classes/class_BaseFrameworkSystem.php:2248: * @todo Write a logging mechanism for productive mode +./inc/main/classes/class_BaseFrameworkSystem.php:2263: // @TODO Finish this part! +./inc/main/classes/class_BaseFrameworkSystem.php:308: // @todo Try to clean these constants up +./inc/main/classes/class_BaseFrameworkSystem.php:3291: * @todo Improve documentation +./inc/main/classes/class_BaseFrameworkSystem.php:3453: * @todo Move all this socket-related stuff into own class, most of it resides in BaseListener +./inc/main/classes/class_BaseFrameworkSystem.php:550: // @TODO __CLASS__ does always return BaseFrameworkSystem but not the extending (=child) class +./inc/main/classes/class_BaseFrameworkSystem.php:654: * @todo SearchableResult and UpdateableResult shall have a super interface to use here +./inc/main/classes/commands/console/class_ConsoleFuseCommand.php:72: // @TODO Unfinished +./inc/main/classes/commands/html/class_HtmlLoginAreaCommand.php:64: * @todo Add some stuff here: Some personal data, app/game related data +./inc/main/classes/commands/html/class_HtmlProblemCommand.php:58: * @todo 0% done +./inc/main/classes/commands/html/class_HtmlStatusCommand.php:58: * @todo 0% done +./inc/main/classes/console/class_ConsoleTools.php:268: * @todo This should be moved out to an external class, e.g. HttpClient +./inc/main/classes/console/class_ConsoleTools.php:269: * @todo Make IP, host name, port and script name configurable +./inc/main/classes/console/class_ConsoleTools.php:276: // @TODO Add some DNS caching here +./inc/main/classes/console/class_ConsoleTools.php:45: * @todo We should connect this to a caching class to cache DNS requests +./inc/main/classes/console/class_ConsoleTools.php:58: // @TODO Here should the cacher be implemented +./inc/main/classes/controller/console/class_ConsoleDefaultController.php:10: * @todo This controller shall still provide some headlines for sidebars +./inc/main/classes/controller/html/class_HtmlConfirmController.php:40: * @todo Add some filters to this controller +./inc/main/classes/controller/html/class_HtmlDefaultController.php:10: * @todo This controller shall still provide some headlines for sidebars +./inc/main/classes/controller/html/class_HtmlLoginController.php:41: * @todo Add some filters to this controller +./inc/main/classes/controller/html/class_HtmlLogoutController.php:10: * @todo This controller shall still provide some headlines for sidebars +./inc/main/classes/controller/html/class_HtmlLogoutDoneController.php:40: * @todo Add some filters to this controller +./inc/main/classes/controller/html/class_HtmlProblemController.php:40: * @todo Add some filters to this controller +./inc/main/classes/controller/html/class_HtmlRegisterController.php:40: * @todo Add some filters to this controller +./inc/main/classes/controller/html/class_HtmlStatusController.php:10: * @todo This controller shall still provide some headlines for sidebars +./inc/main/classes/controller/html/login/class_HtmlLoginAreaController.php:40: * @todo Add some morer filters to this controller +./inc/main/classes/criteria/dataset/class_DataSetCriteria.php:150: // @TODO Issue a warning +./inc/main/classes/criteria/search/class_SearchCriteria.php:102: * @todo Find a nice casting here. (int) allows until and including 32766. +./inc/main/classes/criteria/search/class_SearchCriteria.php:70: * @todo Find a nice casting here. (int) allows until and including 32766. +./inc/main/classes/database/backend/class_CachedLocalFileDatabase.php:327: * @todo Do some checks on the database directory and files here +./inc/main/classes/database/backend/class_CachedLocalFileDatabase.php:616: * @todo Add more generic non-public data for removal +./inc/main/classes/database/class_BaseDatabaseWrapper.php:204: // @TODO Minor: Update above comment to e.g. BaseDatabaseResult +./inc/main/classes/database/frontend/class_NewsDatabaseWrapper.php:10: * @todo Add missing own interface for public methods +./inc/main/classes/database/frontend/class_PaymentsDatabaseWrapper.php:10: * @todo Add missing own interface for public methods +./inc/main/classes/database/result/class_CachedDatabaseResult.php:244: * @todo 0% done +./inc/main/classes/database/result/class_CachedDatabaseResult.php:398: * @todo Find a caching way without modifying the result array +./inc/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php:407: * @todo Find something useful with this! +./inc/main/classes/discovery/payment/class_LocalPaymentDiscovery.php:85: * @todo 0% done +./inc/main/classes/factories/logger/class_LoggerFactory.php:46: // @TODO Unfinished work +./inc/main/classes/factories/login/class_LoginFactory.php:39: * @return $loginInstance An instance of a login helper (@TODO Use actual interface name) +./inc/main/classes/factories/user/class_UserFactory.php:39: * @return $userInstance An instance of a user class (@TODO use actual interface name) +./inc/main/classes/feature/fuse/class_FuseFeature.php:52: * @todo 0% done +./inc/main/classes/file_directories/binary/class_BaseBinaryFile.php:848: // @TODO Unfinished +./inc/main/classes/file_directories/class_BaseAbstractFile.php:154: * @todo Handle seekStatus +./inc/main/classes/file_directories/class_BaseFileIo.php:171: * @todo Handle seekStatus +./inc/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php:68: * @todo Get rid of inConstructor, could be old-lost code. +./inc/main/classes/file_directories/io_stream/class_FileIoStream.php:264: * @todo 0% done +./inc/main/classes/file_directories/io_stream/class_FileIoStream.php:74: * @todo This method needs heavy rewrite +./inc/main/classes/filter/change/class_EmailChangeFilter.php:55: * @todo Implement email change of the user here. HINT: Use the User class! +./inc/main/classes/filter/change/class_PasswordChangeFilter.php:55: * @todo Finished updating user password hash here. HINT: Use the User class again. +./inc/main/classes/filter/news/class_NewsProcessFilter.php:55: * @todo Unfinished stub, add functionality here +./inc/main/classes/filter/payment/class_PaymentDiscoveryFilter.php:97: * @todo 0% done +./inc/main/classes/filter/update/class_UserUpdateFilter.php:55: * @todo Add more user updates here +./inc/main/classes/filter/verifier/class_AccountPasswordVerifierFilter.php:57: * @todo Rewrite handling of different password fields +./inc/main/classes/handler/class_BaseHandler.php:66: * @todo Rewrite this to use DHT +./inc/main/classes/handler/raw_data/network/class_BaseRawDataHandler.php:149: * @todo This method will be moved to a better place +./inc/main/classes/handler/tasks/class_TaskHandler.php:142: // @TODO Messurement can be added around this call +./inc/main/classes/helper/class_BaseHelper.php:183: * @todo Rewrite this method using a helper class for filtering data +./inc/main/classes/helper/class_BaseHelper.php:212: // @TODO Try to log it here +./inc/main/classes/helper/class_BaseHelper.php:478: $this->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] fieldName=' . $fieldName . ' is not set! - @TODO'); +./inc/main/classes/helper/html/forms/class_HtmlFormHelper.php:102: * @todo Add some unique PIN here to bypass problems with some browser and/or extensions +./inc/main/classes/helper/html/forms/class_HtmlFormHelper.php:621: * @todo Add checking if sub option is already added +./inc/main/classes/helper/html/forms/class_HtmlFormHelper.php:649: * @todo Add checking if sub option is already added +./inc/main/classes/helper/html/forms/class_HtmlFormHelper.php:683: // @TODO We need to log this later +./inc/main/classes/helper/html/forms/class_HtmlFormHelper.php:852: * @todo Implement check if rules have been changed +./inc/main/classes/helper/html/links/class_HtmlLinkHelper.php:184: * @todo Completely unimplemented +./inc/main/classes/images/class_BaseImage.php:172: * @todo Find something usefull for this method. +./inc/main/classes/images/class_BaseImage.php:182: * @todo Find something usefull for this method. +./inc/main/classes/images/class_BaseImage.php:192: * @todo Find something usefull for this method. +./inc/main/classes/images/class_BaseImage.php:202: * @todo Find something usefull for this method. +./inc/main/classes/images/class_BaseImage.php:212: * @todo Find something usefull for this method. +./inc/main/classes/images/class_BaseImage.php:231: * @todo Find something usefull for this method. +./inc/main/classes/images/class_BaseImage.php:250: * @todo Find something usefull for this method. +./inc/main/classes/images/class_BaseImage.php:261: * @todo Find something usefull for this method. +./inc/main/classes/images/class_BaseImage.php:271: * @todo Find something usefull for this method. +./inc/main/classes/index/class_BaseIndex.php:150: * @todo Currently the index file is not cached, please implement a memory-handling class and if enough RAM is found, cache the whole index file. +./inc/main/classes/listener/class_BaseListener.php:346: // @TODO On some systems it is 134, on some 107? +./inc/main/classes/listener/class_BaseListener.php:519: // @TODO Does this work on Windozer boxes??? +./inc/main/classes/lists/class_BaseList.php:305: // @TODO Extend this somehow? +./inc/main/classes/lists/groups/class_ListGroupList.php:61: * @todo 0% done +./inc/main/classes/mailer/debug/class_DebugMailer.php:124: * @todo 0% done +./inc/main/classes/menu/class_BaseMenu.php:65: // Log exception @TODO Maybe to intrusive? +./inc/main/classes/output/console/class_ConsoleOutput.php:56: // @TODO Need to rewrite this to $requestInstance->addHeader() +./inc/main/classes/parser/xml/class_XmlParser.php:79: // @TODO We need to find a fallback solution here +./inc/main/classes/points/class_UserPoints.php:100: * @todo Finish loading part of points +./inc/main/classes/request/console/class_ConsoleRequest.php:112: // @TODO Can't this be 'CONSOLE' ? +./inc/main/classes/request/html/class_HtmlRequest.php:10: * @todo Move out the cookie part to a seperate class, e.g. Cookie +./inc/main/classes/response/html/class_HtmlResponse.php:83: * @todo Encryption of cookie data not yet supported. +./inc/main/classes/response/html/class_HtmlResponse.php:84: * @todo Why are these parameters conflicting? +./inc/main/classes/response/html/class_HtmlResponse.php:85: * @todo If the return statement is removed and setcookie() commented out, +./inc/main/classes/response/html/class_HtmlResponse.php:86: * @todo this will send only one cookie out, the first one. +./inc/main/classes/response/image/class_ImageResponse.php:79: // @TODO Please fix this +./inc/main/classes/response/image/class_ImageResponse.php:95: * @todo Encryption of cookie data not yet supported. +./inc/main/classes/response/image/class_ImageResponse.php:96: * @todo Why are these parameters conflicting? +./inc/main/classes/response/image/class_ImageResponse.php:97: * @todo If the return statement is removed and setcookie() commented out, +./inc/main/classes/response/image/class_ImageResponse.php:98: * @todo this will send only one cookie out, the first one. +./inc/main/classes/rng/class_RandomNumberGenerator.php:175: * @todo I had a better random number generator here but now it is somewhere lost :( +./inc/main/classes/rng/class_RandomNumberGenerator.php:97: * @todo Add site key for stronger salt! +./inc/main/classes/stacker/file/class_BaseFileStack.php:162: * @todo Currently the stack file is not cached, please implement a memory-handling class and if enough RAM is found, cache the whole stack file. +./inc/main/classes/stacker/file/class_BaseFileStack.php:337: // @TODO Please implement this, returning FALSE +./inc/main/classes/stacker/file/class_BaseFileStack.php:60: * @todo To hard assertions here, better rewrite them to exceptions +./inc/main/classes/template/class_BaseTemplateEngine.php:1064: // @TODO This silent abort should be logged, maybe. +./inc/main/classes/template/class_BaseTemplateEngine.php:1072: // @TODO Old behaviour, will become obsolete! +./inc/main/classes/template/class_BaseTemplateEngine.php:1075: // @TODO Yet another old way +./inc/main/classes/template/class_BaseTemplateEngine.php:1298: * @todo Make this code some nicer... +./inc/main/classes/template/class_BaseTemplateEngine.php:961: * @todo Unfinished work or don't die here. +./inc/main/classes/template/class_BaseTemplateEngine.php:986: // @TODO Non-string found so we need some deeper analysis... +./inc/main/classes/template/console/class_ConsoleTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() +./inc/main/classes/template/image/class_ImageTemplateEngine.php:215: * @todo Find something usefull with this! +./inc/main/classes/template/image/class_ImageTemplateEngine.php:235: * @todo Add cache creation here +./inc/main/classes/template/mail/class_MailTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() +./inc/main/classes/template/mail/class_MailTemplateEngine.php:228: * @todo Add cache creation here +./inc/main/classes/template/mail/class_MailTemplateEngine.php:238: * @todo Should we call back the mailer class here? +./inc/main/classes/template/mail/class_MailTemplateEngine.php:317: * @todo 0% done +./inc/main/classes/template/menu/class_MenuTemplateEngine.php:305: * @todo Find something useful with this! +./inc/main/classes/template/menu/class_MenuTemplateEngine.php:351: * @todo Add cache creation here +./inc/main/classes/user/class_BaseUser.php:309: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem +./inc/main/classes/user/class_BaseUser.php:81: * @todo Find a way of casting here. "(int)" might destroy the user id > 32766 +./inc/main/classes/user/guest/class_Guest.php:46: * @todo Add more ways over creating user classes +./inc/main/classes/user/member/class_Member.php:88: * @todo Add more ways over creating user classes +./inc/main/exceptions/config/class_NoConfigEntryException.php:10: * @todo Rename this class to NoFoundEntryException +./inc/main/exceptions/main/class_MissingMethodException.php:13: * @todo Try to rewrite user/guest login classes and mark this exception as deprecated +./inc/main/interfaces/application/class_ManageableApplication.php:58: * @todo Nothing to add? +./inc/main/interfaces/class_FrameworkInterface.php:11: * @todo Find a better name for this interface +./inc/main/interfaces/criteria/extended/class_LocalSearchCriteria.php:30: * @todo Find a nice casting here. (int) allows until and including 32766. +./inc/main/interfaces/criteria/extended/class_LocalSearchCriteria.php:54: * @todo Find a nice casting here. (int) allows until and including 32766. +./inc/main/interfaces/database/backend/class_DatabaseBackend.php:109: * @todo Add more generic non-data for removal +./inc/main/interfaces/database/backend/class_DatabaseBackend.php:61: * @todo Do some checks on the database directory and files here +./inc/main/interfaces/handler/task/class_HandleableTask.php:10: * @todo HandleableDataSet looks strange here +./inc/main/middleware/compressor/class_CompressorChannel.php:103: // @TODO Is there a configurable fall-back compressor needed, or is NullCompressor okay? +./inc/main/middleware/debug/class_DebugMiddleware.php:118: // @TODO Initialization phase +./inc/main/middleware/io/class_FileIoHandler.php:174: * @todo 0% done +./inc/main/third_party/api/wernisportal/class_WernisApi.php:10: * @todo Out-dated since 0.6-BETA ./inc/selector.php:11: * @todo Minimize these includes ./index.php:43: * @todo This method is old code and needs heavy rewrite and should be moved to ApplicationHelper ### ### DEPRECATION FOLLOWS: ### ### -./inc/classes.php:9: * @deprecated -./inc/classes/exceptions/main/class_MissingMethodException.php:14: * @deprecated Please do no longer use this exception -./inc/classes/interfaces/database/backend/class_DatabaseFrontendInterface.php:2:// @DEPRECATED -./inc/classes/interfaces/database/frontend/class_DatabaseFrontendInterface.php:2:// @DEPRECATED -./inc/classes/main/database/class_BaseDatabaseFrontend.php:2:// @DEPRECATED -./inc/classes/main/handler/class_BaseHandler.php:2:// @DEPRECATED -./inc/classes/main/handler/raw_data/class_BaseRawDataHandler.php:2:// @DEPRECATED +./inc/classes.php:2:// @DEPRECATED ./inc/database.php:10: * @deprecated -./inc/hooks.php:2:// @DEPRECATED ./inc/includes.php:10: * @deprecated -./inc/output.php:10: * @deprecated +./inc/main/classes/class_BaseFrameworkSystem.php:1882: * @deprecated Not fully, as the new Logger facilities are not finished yet. +./inc/main/exceptions/main/class_MissingMethodException.php:14: * @deprecated Please do no longer use this exception +./inc/main/middleware/debug/class_DebugMiddleware.php:12: * @deprecated See LoggerFactory for a more flexible approach ./inc/selector.php:10: * @deprecated diff --git a/inc/main/classes/class_BaseFrameworkSystem.php b/inc/main/classes/class_BaseFrameworkSystem.php index a1f970d9..1fe12046 100644 --- a/inc/main/classes/class_BaseFrameworkSystem.php +++ b/inc/main/classes/class_BaseFrameworkSystem.php @@ -3450,6 +3450,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @return void * @throws InvalidSocketException If $socketResource is no socket resource * @throws NoSocketErrorDetectedException If socket_last_error() gives zero back + * @todo Move all this socket-related stuff into own class, most of it resides in BaseListener */ protected final function handleSocketError ($method, $line, $socketResource, array $socketData) { // This method handles only socket resources @@ -3481,174 +3482,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { // Finally clear the error because it has been handled socket_clear_error($socketResource); } - - /** - * Constructs a callable method name from given socket error code. If the - * method is not found, a generic one is used. - * - * @param $errorCode Error code from socket_last_error() - * @return $handlerName Call-back method name for the error handler - * @throws UnsupportedSocketErrorHandlerException If the error handler is not implemented - */ - protected function getSocketErrorHandlerFromCode ($errorCode) { - // Create a name from translated error code - $handlerName = 'socketError' . self::convertToClassName($this->translateSocketErrorCodeToName($errorCode)) . 'Handler'; - - // Is the call-back method there? - if (!method_exists($this, $handlerName)) { - // Please implement this - throw new UnsupportedSocketErrorHandlerException(array($this, $handlerName, $errorCode), BaseConnectionHelper::EXCEPTION_UNSUPPORTED_ERROR_HANDLER); - } // END - if - - // Return it - return $handlerName; - } - - /** - * Translates socket error codes into our own internal names which can be - * used for call-backs. - * - * @param $errorCode The error code from socket_last_error() to be translated - * @return $errorName The translated name (all lower-case, with underlines) - */ - public function translateSocketErrorCodeToName ($errorCode) { - // Nothing bad happened by default - $errorName = BaseRawDataHandler::SOCKET_CONNECTED; - - // Is the code a number, then we have to change it - switch ($errorCode) { - case 0: // Silently ignored, the socket is connected - break; - - case 11: // "Resource temporary unavailable" - $errorName = BaseRawDataHandler::SOCKET_ERROR_RESOURCE_UNAVAILABLE; - break; - - case 13: // "Permission denied" - $errorName = BaseRawDataHandler::SOCKET_ERROR_PERMISSION_DENIED; - break; - - case 32: // "Broken pipe" - $errorName = BaseRawDataHandler::SOCKET_ERROR_BROKEN_PIPE; - break; - - case 104: // "Connection reset by peer" - $errorName = BaseRawDataHandler::SOCKET_ERROR_CONNECTION_RESET_BY_PEER; - break; - - case 107: // "Transport end-point not connected" - case 134: // On some (?) systems for 'transport end-point not connected' - // @TODO On some systems it is 134, on some 107? - $errorName = BaseRawDataHandler::SOCKET_ERROR_TRANSPORT_ENDPOINT; - break; - - case 110: // "Connection timed out" - $errorName = BaseRawDataHandler::SOCKET_ERROR_CONNECTION_TIMED_OUT; - break; - - case 111: // "Connection refused" - $errorName = BaseRawDataHandler::SOCKET_ERROR_CONNECTION_REFUSED; - break; - - case 113: // "No route to host" - $errorName = BaseRawDataHandler::SOCKET_ERROR_NO_ROUTE_TO_HOST; - break; - - case 114: // "Operation already in progress" - $errorName = BaseRawDataHandler::SOCKET_ERROR_OPERATION_ALREADY_PROGRESS; - break; - - case 115: // "Operation now in progress" - $errorName = BaseRawDataHandler::SOCKET_ERROR_OPERATION_IN_PROGRESS; - break; - - default: // Everything else <> 0 - // Unhandled error code detected, so first debug it because we may want to handle it like the others - self::createDebugInstance(__CLASS__)->debugOutput('BASE-HUB[' . __METHOD__ . ':' . __LINE__ . '] UNKNOWN ERROR CODE = ' . $errorCode . ', MESSAGE = ' . socket_strerror($errorCode)); - - // Change it only in this class - $errorName = BaseRawDataHandler::SOCKET_ERROR_UNKNOWN; - break; - } - - // Return translated name - return $errorName; - } - - /** - * Shuts down a given socket resource. This method does only ease calling - * the right visitor. - * - * @param $socketResource A valid socket resource - * @return void - */ - public function shutdownSocket ($socketResource) { - // Debug message - self::createDebugInstance(__CLASS__)->debugOutput('HUB-SYSTEM: Shutting down socket resource ' . $socketResource . ' with state ' . $this->getPrintableState() . ' ...'); - - // Set socket resource - $this->setSocketResource($socketResource); - - // Get a visitor instance - $visitorInstance = ObjectFactory::createObjectByConfiguredName('shutdown_socket_visitor_class'); - - // Debug output - self::createDebugInstance(__CLASS__)->debugOutput('HUB-SYSTEM:' . $this->__toString() . ': visitorInstance=' . $visitorInstance->__toString()); - - // Call the visitor - $this->accept($visitorInstance); - } - - /** - * Half-shuts down a given socket resource. This method does only ease calling - * an other visitor than shutdownSocket() does. - * - * @param $socketResource A valid socket resource - * @return void - */ - public function halfShutdownSocket ($socketResource) { - // Debug message - self::createDebugInstance(__CLASS__)->debugOutput('HUB-SYSTEM: Half-shutting down socket resource ' . $socketResource . ' with state ' . $this->getPrintableState() . ' ...'); - - // Set socket resource - $this->setSocketResource($socketResource); - - // Get a visitor instance - $visitorInstance = ObjectFactory::createObjectByConfiguredName('half_shutdown_socket_visitor_class'); - - // Debug output - self::createDebugInstance(__CLASS__)->debugOutput('HUB-SYSTEM:' . $this->__toString() . ': visitorInstance=' . $visitorInstance->__toString()); - - // Call the visitor - $this->accept($visitorInstance); - } - - // ************************************************************************ - // Socket error handler call-back methods - // ************************************************************************ - - /** - * Handles socket error 'permission denied', but does not clear it for - * later debugging purposes. - * - * @param $socketResource A valid socket resource - * @param $socketData A valid socket data array (0 = IP/file name, 1 = port) - * @return void - * @throws SocketBindingException The socket could not be bind to - */ - protected function socketErrorPermissionDeniedHandler ($socketResource, array $socketData) { - // Get socket error code for verification - $socketError = socket_last_error($socketResource); - - // Get error message - $errorMessage = socket_strerror($socketError); - - // Shutdown this socket - $this->shutdownSocket($socketResource); - - // Throw it again - throw new SocketBindingException(array($this, $socketData, $socketResource, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET); - } } // [EOF] -- 2.39.5