Roland Häder [Fri, 17 Feb 2023 18:03:23 +0000 (19:03 +0100)]
Continued:
- removed .htaccess file, please protect applications/, db/, framework/ by
yourself
- this makes this script more independent from the used web server
Roland Häder [Wed, 15 Feb 2023 20:40:30 +0000 (21:40 +0100)]
Continued:
- added method FrameworkConfiguration::isEnabled() which requires configuration
keys like 'is_foo_enabled' while you can just invoke
$configInstance->isEnabled('foo')
- Added some debug lines
- added missing configuration entries
- Configuration entries like is_<form-name>_captcha_secured_enabled are still missing
Roland Häder [Fri, 10 Feb 2023 16:13:02 +0000 (17:13 +0100)]
Continued:
- empty($element) is the culpit here, '0' will be FALSE, 0 will be false and
all needs to be true, so let's check $element === '' and it is solved
Roland Häder [Fri, 10 Feb 2023 15:57:00 +0000 (16:57 +0100)]
Continued:
- thanks to type-hints, I was able to find out that
appendStringToGenericArrayElement() was invoked wrong here, it must be
setGenericArrayElement() instead which makes sense from addCriteria()
method's scope
Roland Häder [Thu, 16 Dec 2021 11:52:42 +0000 (12:52 +0100)]
Continued:
- Better check against SplFileObject instead of is_object(). First one is a
keyword (instanceof), later is a function call
- More debug logging
- Added missing "import" lines
- Replaced more array() with []
Roland Häder [Sun, 12 Dec 2021 09:09:22 +0000 (10:09 +0100)]
Continued:
- "cached" more configuration entries to class fields to avoid "expensive"
invocations on FrameworkConfiguration->getConfigEntries()
- rewrote some "soft" assertions to hard exceptions as this cannot be let through
Roland Häder [Sun, 12 Dec 2021 07:44:25 +0000 (08:44 +0100)]
Continued:
- "cached" configuration entry 'developer_mode_enabled' and
'debug_*_output_timings' into class fields to avoid "expensive" calls all over
again to FrameworkConfiguration->getConfigEntry()
Roland Häder [Sun, 12 Dec 2021 06:30:30 +0000 (07:30 +0100)]
Continued:
- made ClassLoader final as no inheriting classes shall be made (it is generic
enough)
- renamed ClassLoader->$foundClasses to $pendingFiles as this describes the
content of the array more closely
- removed some old-lost "// END - if" (WAY more to follow!)
Roland Häder [Sat, 11 Dec 2021 23:18:41 +0000 (00:18 +0100)]
Continued:
- StringUtils::convertToClassName() is now "in-method cached". That means that
the parameter $str is used as key and the value is being generated when the
key does not exist in self::$cache array
Roland Häder [Sat, 11 Dec 2021 23:13:14 +0000 (00:13 +0100)]
Continued:
- moved getCacheKeyByCriteria() to BaseDatabaseFrontend class, maybe not the
final resting place, but better than in the generic, bloated
BaseFrameworkSystem class
- Introduced BaseXmlTemplateEngine->$initMethodName to avoid an additional
invocation of StringUtils::convertToClassName() on each invocation of
startElement()
Roland Häder [Sat, 11 Dec 2021 21:47:55 +0000 (22:47 +0100)]
Continued:
- invoking ksort() by every invocation of setConfigEntry() is very "expensive"
as sorting arrays take time. Better is to load all configuration files and
then sort it only once.
Roland Häder [Sun, 17 Jan 2021 06:02:12 +0000 (07:02 +0100)]
Continued:
- "externalized" hard-wired hash function name "sha256" to configuration key
"crypto_hash_function_name", maybe others will follow?
- renamed $config array to $configData in FrameworkConfiguration class
- since PHP doesn't support static initializer, e.g. like Java does, added
private, static method staticInitializer() which is (in Java) executed only
once when the class file has been loaded
Roland Häder [Sun, 17 Jan 2021 04:54:29 +0000 (05:54 +0100)]
Continued:
- added hash-benchmark.php; previous in "hub" project aka. mhash-benchmark.php,
but since ext-mash is replaced by Hash, this needs porting, too.
- "new" array style [] used in audio.php
- ported CryptoUtils::hash() to PHP's new Hash "extension"
- Minor improvements
Roland Häder [Fri, 8 Jan 2021 07:56:05 +0000 (08:56 +0100)]
Continued:
- moved self::$hashLength, getHashLength() and hash() methods to new
CryptoUtils class for lesser monolithic code in BaseFrameworkSystem class
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