Nestbox's purpose is to be a PDO wrapper for easily impelmenting database functionality within a PHP project.
(or classes, or packages, or however you want to view them)
Each bird (class) in the "nestbox" serves as a way to add specific functionality to Nestbox.
| Bird | Description |
|---|---|
| Nestbox | The core "abstract" class that interfaces each component class of Nestbox with the database. |
| Babbler | Content management for website/blog functionality. |
| Bullfinch | Message board management. (Not yet complete/available) |
| Cuckoo | Transparent in-line encryption for queries. (Not yet complete/available) |
| Lorikeet | An image upload processing and indexing. (Not yet complete/available) |
| Macaw | An interface for the Microsoft PlayFab REST API |
| Magpie | A user and role permissions manager. |
| Titmouse | User registration and session management with built-in password best-practicces. |
| Weaver | REST API endpoint management. (Not yet complete/available) |
The following is intended to provide guidelines for future development
For code cleanliness, code consistancy, and future development and maintenance, each class should have a structure matching the following:
- Class Name
- The name must be a bird for no reason other than thematic reasoning
- The constant
PACKAGE_NAMEmust be set to match the bird name of the class
- Class Settings
- classes may use the nestbox_settings table to store perpetual configurations
- Settings are automatically loaded and saved based on variable names
- Any variables starting with the class bird name will be loaded from the settings table with
load_settings()and saved to the settings table withsave_settings()
- Class Tables
- Each table a class uses should have a unique function to create each table and associated triggers/views that is required for the class to work
- Each table creation function must start with
create_class_table_ - Whenever Nestbox encounters an InvalidTableException, it attempts to create all class tables, then reattempts the query that threw the exception, but this only works if the functions are named appropriately
- Class Methods
- The remaining code of the class will be the class functions organized in a logical flow in order of how they might be used in practice within a project
- Function visibility should be practiced where only the functions intended for users are public and all remaining will be private.
- Documentation
- Document of each public function is required, but optional for private or protected functions