Roland Häder [Fri, 8 Jan 2021 06:56:54 +0000 (07:56 +0100)]
Continued:
- moved utilities classes to plural path names and namespaces
- added ArrayUtils class for handling arrrays
- used that new class' method to map numeric array elements to associative
Roland Häder [Thu, 7 Jan 2021 23:48:44 +0000 (00:48 +0100)]
Continued:
- rewrote a bit class loader, it used both
FrameworkBootstrap::getConfigurationInstance() and a copied instance to get
configuration entries, now only the former one is used
- moved constants to interface BinaryFile
Roland Häder [Thu, 7 Jan 2021 20:18:27 +0000 (21:18 +0100)]
Continued:
- removed SeekableWritableFileIterator as this had no real function but only
handled over the method calls to the inner class
- for now on let's get the $binaryFileInstance directly from it
Roland Häder [Wed, 6 Jan 2021 19:59:09 +0000 (20:59 +0100)]
Continued:
- fixed bug which occured because the last block was counted twice. This
happened when read() returns an empty (zero length) string which was not
properly handled (maybe EOF reached).
Roland Häder [Wed, 6 Jan 2021 19:28:35 +0000 (20:28 +0100)]
WIP:
- thrown exceptions when parameter values/types are not valid
- added type-hints for primitive variables
- partially fixed writing index files for other non-humanreadable files (see
BaseBinaryFile class)
Roland Häder [Sun, 20 Dec 2020 11:43:56 +0000 (12:43 +0100)]
Continued:
- fixed BaseFileIndex' constructor, thanks to the private access, I found my
mistake here, needs to be protected access and with $className parameter
(string, of course)
- also include list group only when valid
Roland Häder [Sun, 20 Dec 2020 11:22:12 +0000 (12:22 +0100)]
Continued:
- NULL is no longer allowed as "empty" strings for $groupName are not allowed
- this whole thing was a bit complicated core and now still is buth with no NULL
Roland Häder [Sun, 20 Dec 2020 11:09:05 +0000 (12:09 +0100)]
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
Roland Häder [Sun, 20 Dec 2020 10:58:54 +0000 (11:58 +0100)]
Continued:
- added type-hints for primitive variables
- added condition-checks for string/int parameter and when condition is not met
an IAE is being thrown
Roland Häder [Thu, 10 Dec 2020 01:37:41 +0000 (02:37 +0100)]
Refacuring / possible WIP:
- rewrote a lot clases and cleared up abuse of Block interface
- got rid of $applicationInstance as this can be retrieved singelton
- moved some files, added new BaseFileIndex class
Roland Häder [Wed, 9 Dec 2020 05:40:21 +0000 (06:40 +0100)]
Continued:
- interface Block was abused for file classes (index file/file-based stack) and
is now free of it
- BinaryFile replaces it and other inheriting interfaces are cleared (moved
methods to BinaryFile)
Roland Häder [Wed, 9 Dec 2020 01:41:22 +0000 (02:41 +0100)]
Continued:
- renamed ambicious methods key/valid/... as they are iterator-only methods
- also got rid of key() as determineSeekPosition() and getSeekPosition() are
there already
Roland Häder [Tue, 8 Dec 2020 23:20:01 +0000 (00:20 +0100)]
Continued:
- commented out a lot debug messages
- still closeFile() and __destruct() interfere with PHPUnit's output
- Fixed bugs in pre-allocating binary files and needed to add 2 to header size for first free gap
- also introduced some private methods to ease adding gaps (start/end seek positions)
Roland Häder [Mon, 7 Dec 2020 14:16:48 +0000 (15:16 +0100)]
Rewrites:
- more thrown exceptions
- more debug logging (currently messing up phpunit output)
- more type-hints for primitive variables added
- writeAtPosition() must be used instead of writeData() as the later one
increments the counter
- debug log files could contain non-text data, so let's treat them as as text
anyway ...
Roland Häder [Mon, 7 Dec 2020 07:55:19 +0000 (08:55 +0100)]
Continued:
- ObjectFactoty is now final, extend BaseFactory instead and if you still need
to invoke methods, just do it the normal way
- this allows better unit-testing
Roland Häder [Sun, 6 Dec 2020 11:24:23 +0000 (12:24 +0100)]
Continued:
- replaced InvalidObjectException with InvalidArgumentException
- that custom exception was already deprecated/unwanted anyway
- moved classes to deeper packages
Roland Häder [Sun, 6 Dec 2020 10:22:10 +0000 (11:22 +0100)]
Continued:
- configuration keys __detected_* are abusive to the configuration class,
faster and more confirm is to use static class fields and static getter
for it.
Roland Häder [Sun, 6 Dec 2020 09:32:52 +0000 (10:32 +0100)]
Continued:
- updated index.php
- PHP_Invoker is now with a namespace, so no need for disabling strict
naming-convention check
- removed some old END - *
- renamed configuration entries 'detect_*' to '__detect_*' as they are dummies
- maybe later get rid of them as the configuration class seem to be "abused"
here a bit
- converted old array() to "new" []
Roland Häder [Sun, 6 Dec 2020 07:48:31 +0000 (08:48 +0100)]
Continued:
- Application instance in generic registry was a little of an overdoze when
there is ApplicationHelper::getSelfInstance() around, this means lesser
method invocations and a bit smaller footprint (one registry entry lesser)
Roland Häder [Sat, 5 Dec 2020 23:56:23 +0000 (00:56 +0100)]
Continued:
- validated more parameters to avoid bad invocation with invalid values
- int $bytes = NULL was my default, SPL says 0, not NULL as default value
- improved logger messages by adding type and all parameters
Roland Häder [Sat, 5 Dec 2020 22:24:29 +0000 (23:24 +0100)]
Continued:
- renamed some namespaces
- renamed BaseFileStack::ARRAY_INDEX_* to ARRAY_NAME_* as these constants
contain names and not numbers
- also moved them to interface StackableFile
Roland Häder [Thu, 3 Dec 2020 20:48:15 +0000 (21:48 +0100)]
Continued:
- logging __METHOD__ + __LINE__ again is no more needed since rewrite of logger
- possible fix for wrong valid() result (was FALSE while there was one entry
there)
Roland Häder [Wed, 2 Dec 2020 05:16:36 +0000 (06:16 +0100)]
Refacuring:
- removed CacheFactory, is already reduced to what
ObjectFactory::createObjectByConfiguredName() does
- external $cache, $compressorChannel and $ioHandler as traits
- added type-hints for primitive variables
Roland Häder [Tue, 1 Dec 2020 23:36:50 +0000 (00:36 +0100)]
Continued:
- Removed monolithic BaseFrameworkSystem->flushPendingUpdates()
- REFACTURING: moved some instances to traits, will continue with other
instances after these have been tested
Roland Häder [Tue, 24 Nov 2020 08:19:31 +0000 (09:19 +0100)]
Continued:
- WIP: ops, stack file and its index file were accidentally mixed into the
stack which has caused reading errors. Still position 4 is written
- added/commented in more noisy debug lines
- added primitive type-hints
Roland Häder [Tue, 24 Nov 2020 03:14:09 +0000 (04:14 +0100)]
Continued:
- moved language instance methods from monolithic and wrong registry-usage to
FrameworkBootstrap
- added type-hints for primitive variables (also maybe in last 3 commits)
Roland Häder [Tue, 24 Nov 2020 02:23:38 +0000 (03:23 +0100)]
Continued:
- moved $searchInstance + getter/setter from monolithic BaseFrameworkSystem to
proper classes/interfaces
- moved interfaces in own sub directories and not "extended"
Roland Häder [Tue, 24 Nov 2020 02:07:26 +0000 (03:07 +0100)]
Continued:
- moved $updateInstance and getter/setter to proper BaseDatabaseResult class
- renamed $class to $className
- removed __CLASS__ as default value from any abstract class' constructor
Roland Häder [Sun, 22 Nov 2020 16:53:01 +0000 (17:53 +0100)]
Continued:
- fixed resolving order:
1) application's controller will be checked
2) the application "tests" need its own default news controller
3) else load framework's default news controller
Roland Häder [Sun, 15 Nov 2020 02:04:56 +0000 (03:04 +0100)]
Continued with chash:
- hashing was to fast, commented out very noisy debug lines
- also flushing was to often now, now every 10 seconds and on finding a new block