If not created Logger class will be auto created in \DB\IO Recommended to run a CoreLibs\Debug\Logging([...]); and use this class for all ACL\Login, Admin\Backend, DB\IO, Output\Form\Generate calls. Last parameter after DB CONFIG is the log parameter Session create has been moved to a new Create\Session class from the \Basic class and MUST be started before using ACL\Login. Currently ACL\Login will fallback and start it if no session is yet started. See the Readme.md file for which classes use _SESSION data In future the _SESSION settings should be moved to some wrapper class for this so we can unit test sessions Only Output\Form\Generate class call has the new changed with the second parameter no longer beeing the table width setting but the class setting. But as this is a semi retired class and only used for edit_base this is not 100% breaking. All other classes can be used as is and have internal fallback to run as before. Deprecation messages will be added later.
87 lines
2.1 KiB
Markdown
87 lines
2.1 KiB
Markdown
# PHP Core Library
|
|
|
|
## Code Standard
|
|
|
|
* Uses PSR-12
|
|
* tab indent instead of 4 spaces indent
|
|
* Warning at 120 character length, error at 240 character length
|
|
|
|
## General information
|
|
|
|
Base PHP class files to setup any project
|
|
* login
|
|
* database wrapper
|
|
* basic helper class for debugging and other features
|
|
* admin/frontend split
|
|
* domain controlled database/settings split
|
|
* dynamic layout groups
|
|
|
|
## NOTE
|
|
|
|
There are three branches:
|
|
|
|
### master
|
|
|
|
The active branch, which is the namespace branch.
|
|
Currently compatible with PHP 7.4 and 8.0
|
|
|
|
### legacy
|
|
|
|
The old non namepsace format layout.
|
|
This is fully deprecated and will no longer be maintaned.
|
|
last tested PHP 5.6 and PHP 7.0
|
|
|
|
### development
|
|
|
|
Any current development is done here
|
|
|
|
## Static checks
|
|
|
|
With phpstan (`4dev/checking/phpstan.sh`)
|
|
`phpstan`
|
|
|
|
With phan (`4dev/checking/phan.sh`)
|
|
`phan --progress-bar -C --analyze-twice`
|
|
|
|
pslam is setup but not configured
|
|
|
|
## Unit tests
|
|
|
|
With phpunit (`4dev/checking/phpunit.sh`)
|
|
`phpunit -c $phpunit.xml 4dev/tests/`
|
|
|
|
|
|
## Other Notes
|
|
|
|
### Session used
|
|
|
|
The following classes use _SESSION
|
|
The main one is ACL\Login, this class will fail without a session started
|
|
|
|
* \CoreLibs\ACL\Login
|
|
* \CoreLibs\Admin\Backend
|
|
* \CoreLibs\Output\Form\Generate
|
|
* \CoreLibs\Output\Form\Token
|
|
* \CoreLibs\Template\SmartyExtend
|
|
|
|
### Class extends
|
|
|
|
The following classes extend these classes
|
|
|
|
* \CoreLibs\ACL\Login extends \CoreLibs\DB\IO
|
|
* \CoreLibs\Admin\Backend extends \CoreLibs\DB\IO
|
|
* \CoreLibs\DB\Extended\ArrayIO extends \CoreLibs\DB\IO
|
|
* \CoreLibs\Output\Form\Generate extends \CoreLibs\DB\Extended\ArrayIO
|
|
* \CoreLibs\Template\SmartyExtend extends SmartyBC
|
|
|
|
### Class used
|
|
|
|
The following classes use the following classes
|
|
|
|
* \CoreLibs\ACL\Login uses \CoreLibs\Debug\Logger, \CoreLibs\Language\L10n
|
|
* \CoreLibs\DB\IO uses \CoreLibs\Debug\Logger, \CoreLibs\DB\SQL\PgSQL
|
|
* \CoreLibs\Admin\Backend uses \CoreLibs\Debug\Logger, \CoreLibs\Language\L10n
|
|
* \CoreLibs\Output\Form\Generate uses \CoreLibs\Debug\Logger, \CoreLibs\Language\L10n
|
|
* \CoreLibs\Template\SmartyExtend uses \CoreLibs\Language\L10n
|
|
* \CoreLibs\Language\L10n uses FileReader, GetTextReader
|