composer and comments update

This commit is contained in:
Joey Kimsey
2025-02-02 18:42:29 -05:00
parent 795784f02e
commit 394e752094
24 changed files with 110 additions and 221 deletions

View File

@ -1,52 +1,70 @@
# Bedrock
## Developer(s): Joey Kimsey
This library utilizes the MVC architecture in addition to a custom templating engine designed to make building web applications fast and simple.
Bedrock is the core functionality used by [The Tempus Project](https://github.com/TheTempusProject/TheTempusProject) a rapid prototyping framework. It provides database support, configuration, base models, and base controller functionality a in addition to a host of other integrated functions.
This Library can be utilized outside of TheTempusProject, but the functionality has not been tested well as a stand-alone library.
**Notice: This Library is provided as is, please use at your own risk.**
## Installation
## Installation and Use
To install simply use the composer command:
The easiest way to use Bedrock in your application is to install it via composer and extend the main app inside of the bin folder.
`php composer.phar require thetempusproject/bedrock`
`Composer.json`
## Usage
```json
"require": {
"TheTempusProject/Bedrock": "*",
},
"autoload": {
"psr-4": {
"TheTempusProject\\Bedrock\\": "vendor/thetempusproject/bedrock",
}
}
```
`app.php`
Typical usage would be through including the package via composer.
```php
<?php
namespace MyApp;
use TheTempusProject\Bedrock\Bin\Bedrock;
require_once VENDOR_DIRECTORY . 'autoload.php';
class MyApp extends Bedrock {
// Stuff and Things
// "Stuff", "Things", and "What-not"
}
?>
```
If you prefer to handle auto-loading via other means, you can simply clone this repository wherever you need it.
If you would like to use hermes own autoloading, simply inclode the constants file and the autoload file inside `/bin/`.
```php
use TheTempusProject\Bedrock\Bin\Bedrock;
// Bedrock Constants
if ( ! defined( 'BEDROCK_CONSTANTS_LOADED' ) ) {
if ( defined( 'BEDROCK_CONFIG_DIRECTORY' ) ) {
require_once BEDROCK_CONFIG_DIRECTORY . 'constants.php';
}
}
// Bedrock Autoloader (Autoloader)
if ( ! defined( 'BEDROCK_AUTOLOADED' ) ) {
if ( defined( 'BEDROCK_ROOT_DIRECTORY' ) ) {
require_once BEDROCK_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
}
}
class MyApp extends Bedrock {
// "Stuff", "Things", and "What-not"
}
```
### To-Do
- [ ] Expansion of PDO to allow different database types
- [ ] Updates for configs and models to re-build based on a delta model, to make version changes simpler. (Migration system)
- [ ] Implement better uniformity in terms of error reporting, exceptions, logging.
## Issues / Bugs / Contact
If anyone actually uses this library and runs into any issues, feel free to contact me and I'll look into it.
[Joey Kimsey](mailto:Joey@thetempusproject.com) - _Lead Developer_
[JoeyKimsey.com](https://JoeyKimsey.com)