Done
Move the more common boolean values to base class.
This must be implemented in a driver, make abstract.
phpdoc
Simplify
Log query before the error message and consistently log errors with the correct level.
Binary notation is a subset of hex notation, so check it last.