Continued: - no need for redundant code for just test classes, it can be done in the application's 'classes' path
Continued: - updated year to 2023
Continued: - introduced exception code for InvalidArgumentException
Continued: - updated framework's (and testing application's) copyright year - also for tests copyright year has been updated Signed-off-by: Roland Häder <roland@mxchange.org>
Continued: - updated copyright year Signed-off-by: Roland Häder <roland@mxchange.org>
Rewrite: - constructors of concrete (=implementing non-abstract) classes should be private to avoid somone making an inheriting class of a concrete class - this is good practice: only make inheriting (concrete) classes of abstract classes, not another concrete class only because you want that functionality in your class, too - the private constructor also stops you from doing such wrong things, no need to make all concrete classes final Signed-off-by: Roland Häder <roland@mxchange.org>
Refacuring: - moved state, template and resolver instances to distinct traits Signed-off-by: Roland Häder <roland@mxchange.org>
Continued: - Copyright year updated Signed-off-by: Roland Häder <roland@mxchange.org>
Continued: - updated copyright year (code was really updated there but not the year itself) - __call() does now finally show proper class name and only 'unknown' when self::$instance is not set (which must be an instance of FrameworkInterface for an obvious reason ...) Signed-off-by: Roland Häder <roland@mxchange.org>
Continued: - it is getFileObject() not getPointer() - also let that method invoke wrapped file pointer instance' same method Signed-off-by: Roland Häder <roland@mxchange.org>
Continued: - no need to handle $applicationInstance around as it exists in GenericRegister already - please update your index.php to this Signed-off-by: Roland Häder <roland@mxchange.org>
Continued: - ApplicationHelper needs to expand BaseApplication to have "self-registration" generically done - so no more need to register 'application' instance everywhere else, just here Signed-off-by: Roland Häder <roland@mxchange.org>
Continued: - added Org\Nxchange\ namespace followwing Java convention Signed-off-by: Roland Häder <roland@mxchange.org>
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>
also the factory has been imported Signed-off-by: Roland Häder <roland@mxchange.org>
first namespace, then other 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>
Moving-session has started: - moved all files in application/tests/classes/ to framework/main/tests/ as they can (and should) be used by any application that wishes to run (unit) tests. Signed-off-by: Roland Häder <roland@mxchange.org>