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

v1.0.4 2025-11-21 13:20 UTC

This package is auto-updated.

Last update: 2025-12-26 21:31:06 UTC


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

  1. Install dependencies:
    composer install
  2. Using WPLite in your plugin: Refer to src/wplite-sample.php for 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.
  3. Configuration: Edit src/WPLite/Config.php or provide your own config files as needed.
  4. Extend functionality:
    • Define your routes in src/routes (recommended)
    • Register new service providers
    • Implement custom middleware, models, and views

Contributing

Pull requests and issues are welcome! Please follow PSR standards and write tests for new features.

License

See vendor/LICENSE for details.