Copyright (C) 2015-2025 Mark Constable [email protected] (AGPL-3.0)
This is a very simple PHP8.4 "framework" that will be expanded to include more small project examples building on the first very lean foundation and incorporating additional functionality in each successive example.
This is the easiest way to display and develop this project...
bash -c "$(curl -fsSL https://php.new/install/linux)"
[[ ! -d ~/Dev ]] && mkdir ~/Dev
cd ~/Dev
git clone https://github.com/markc/spe
cd spe
export PATH=$PATH:~/.config/herd-lite/bin
composer install
php -S localhost:8000
Each folder will contain a more comprehensive example of a working, and hopefully useful, sub-projects with a README.md explaining each example.
-
At 140 LOC this is about the simplest 3 page example of this particular framework style I could come up with. It is a self-contained single script with all code encapsulated within a single anonymous class and one
echo
.Key Features:
- Single File Architecture
- Type Safety
- Modern PHP 8.4
- Clean URL Routing
- XSS Protection
- Responsive Design
-
Funcionally similar to the above barebones example but with a small amount of inline CSS to provide a minimum of style along with the Roboto font from Google CDN.
Key Differences:
- Integrated Bootstrap 5 styling
- Flexible navigation system
- Modern PHP 8.x features
-
A simple example of providing "plugins" which are basically the model of the traditional MVC coding style. It also includes a simple AJAX link on the About page that dumps the main global output array using the ultra simple remote XHR API. There is also an example of passing a success/error message back into the same page but it will be replaced with session vars in one of the next examples.
Key Components:
- Config Class
- Init Class
- Plugin Abstract Class
- Concrete Plugin Classes
- Util Class
-
Extend the above example to include basic themeing classes and methods.
TODO: write doc
-
Add PSR-4 autoload via composer.
Key Features:
- Plugin Architecture
- Theme System
- Context Management
- Logging
- Responsive Design
- AJAX Support
-
TODO: write doc
-
TODO: write doc
-
TODO: write doc
-
TODO: write doc
-
TODO: write doc
The associated example README files will act as both code comments and general documentation for each project.