Skip to content

supergnaw/Nestbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nestbox

Nestbox's purpose is to be a PDO wrapper for easily impelmenting database functionality within a PHP project.

Nestbox Birds

(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)

Development & Contributing

The following is intended to provide guidelines for future development

Class Structure

For code cleanliness, code consistancy, and future development and maintenance, each class should have a structure matching the following:

  1. Class Name
    • The name must be a bird for no reason other than thematic reasoning
    • The constant PACKAGE_NAME must be set to match the bird name of the class
  2. 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 with save_settings()
  3. 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
  4. 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.
  5. Documentation
    • Document of each public function is required, but optional for private or protected functions

About

A database content management system written in php typically to easily fill gaps of very niche requirements and probably a result of NIH syndrome.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages