hsm / wplite
WPLite WordPress Framework
Installs: 21
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/hsm/wplite
README
WPLite is a lightweight PHP framework designed to simplify WordPress plugin and application development. It provides a modular architecture, dependency injection, routing, middleware, and other modern features for building scalable WordPress solutions.
Features
- Modular structure with service providers
- Dependency injection container
- Routing and middleware support
- Facades for common services
- Database abstraction
- Authentication and guards
- Resource and view management
Directory Structure
composer.json # Composer dependencies and autoloading
src/
wplite-sample.php # Sample plugin main file (not entry point)
WPLite/
Application.php # Core application class
Config.php # Configuration management
Container.php # Dependency injection container
DB.php # Database abstraction
... # Other core classes
Adapters/ # Adapter pattern implementations
Auth/ # Authentication and guards
Contracts/ # Interfaces and contracts
Facades/ # Facade classes for services
Helpers/ # Helper functions
Middlewares/ # Middleware implementations
Providers/ # Service providers
vendor/ # Composer dependencies
Getting Started
- Install dependencies:
composer install
- Using WPLite in your plugin:
Refer to
src/wplite-sample.phpfor an example of how to use WPLite in your own WordPress plugin main file. This file demonstrates how to bootstrap and run the WPLite application within a plugin context. It is not the entry point of the package itself. - Configuration:
Edit
src/WPLite/Config.phpor provide your own config files as needed. - Extend functionality:
- Define your routes in
src/routes(recommended) - Register new service providers
- Implement custom middleware, models, and views
- Define your routes in
Contributing
Pull requests and issues are welcome! Please follow PSR standards and write tests for new features.
License
See vendor/LICENSE for details.