Rewrite continues: - EmptyVariableException can be easily replaced by InvalidArgumentException (IEA) because there is no need for to over-detailed exceptions, but still it is a good idea to have more (custom) around than the defaults - MissingMethodException was no longer used and is now emptied - updated TODOs.txt - ignored vendor in todo-builder.sh Signed-off-by: Roland Häder <roland@mxchange.org>
Continued a bit: - in the wake of mcrypt being deprecated, an OpenSSL-based implementation needs to be written. This commit marks the start for it. Please note, that currently you don't have *ANY* encryption as the methods are unfinished - moved DATA_PAYLOAD_SEPARATOR to EncryptableStream - updated TODOs.txt Signed-off-by: Roland Häder <roland@mxchange.org>
Rewrite continued: - the framework now attempts to initialize the application more OOP-ed - this is done by calling 3 simple methods: + FrameworkBootstrap::initFramework(); + FrameworkBootstrap::prepareApplication(); + FrameworkBootstrap::startApplication(); - initFramework: 3 simple steps again: + scanFrameworkClasses: scans for framework-related classes, interfaces and exceptions + determineRequestType: determines request-type (console, html) and loads all given parameter into the initialized request class. It also initializes the response instance + validateApplicationParameter: validates the parameter 'app' if it is there and points to a valid application (very basic check, more later on) - prepareApplication: Prepares detected application by attempting to load all required include files and only optional if present. Please note that some files are now deprecated and should be ported to the new methods (see below) - startApplication: Starts the application by calling 3 methods: + setupApplicationData: replacement for data.php, sets all application's data. Please don't set any configuration stuff here, this is still done in config.php! + initApplication: Calls some additional methods to initialize application. Here is a good place to init database instance by calling the shiny new method initDatabaseInstance(). + launchApplication: Still old method name which starts the application. Please remove any request/response-init stuff from here as it is now generically done in FrameworkBootstrap - include files in framework/database/ are now all deprecated - renamed framework/config.inc.php -> framework/config-global.php - PrimeraPortal's API is history, so let us remove the obsolete file here, too - some "contrib" files updated - updated TODOs.txt - moved rand.php to contrib/ folder Signed-off-by: Roland Häder <roland@mxchange.org>
Renamed some paths and a class for better understanding them: - Classes in 'databases' were backend classes (doing the hard work) so it got renamed to 'backend' - Classes in 'wrapper' were frontend classes (which classes from e.g. the "business logic" may use) so it got renamed to 'frontend' - To both above renames there are already proper "base" classes - Renamed 'LocalFileDatabase' to 'CachedLocalFileDatabase' as the entire (!) result is stored in $resultData. This is maybe fine for small tables but never good for tables with a lot rows (I don't want to name a number here). - TODOs.txt updated Signed-off-by: Roland Häder <roland@mxchange.org>
Continued CSV parsing: - Introduced readCsvFileLine() which reads a line from a CSV file and parses it to an indexed array - Introduced readLine() which will read a line (not limited) from a text file - Method read() will now work without parameters (depending on implementation, e.g. binary files must always be read with a buffer length) - Other improvements - TODOs.txt updated Signed-off-by: Roland Häder <roland@mxchange.org>
Rewritten class loader to skip deprecated class files: - Rewritten class loader to skip deprecated class files which should make all applications working again. This is done by checking its size because I will remove all code from the PHP include file and add a @DEPRECATED tag to it. A typical size is 24 bytes - __set() and __get() are now calling debugBackTrace() with a message to aid finding e.g. typos in field/attribute names - debugBackTrace() does now accept an optional parameter for a message - TODOs.txt updated
Introduced new setter/getter and generic interface: - Added a generic Helper interface - Moved some interfaces to maintain hierarchical directory style - Used that interface in the generic setter which has been moved from the BaseCaptcha class to BaseFrameworkSystem - Added source instance, setter and getter from 'hub' project - TODOs.txt updated