PHPackages                             jascha030/wp-oop - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jascha030/wp-oop

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

jascha030/wp-oop
================

WP OOP On Roids (working title)

011PHP

Since Sep 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jascha030/wp-oop)[ Packagist](https://packagist.org/packages/jascha030/wp-oop)[ RSS](/packages/jascha030-wp-oop/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

WP-OOP
======

[](#wp-oop)

Backbone for interfacing with the Wordpress Plugin Common API (Hooks). Keeping track of actions and filters and making it easy to hook or unhook class methods.

This package includes a simple Service container (Pimple) wrapper that hooks class methods in a way that lazy-loads the actual methods. Providing the class construction whenever the class is first called by a WP filter/action.

Geting started
--------------

[](#geting-started)

### Requirements

[](#requirements)

- Wordpress
- composer
- php &gt;= 7.4

> Keep in mind, because I built this package to supply a more modern way to develop wordpress plugins. Therefore this package does not follow the Wordpress Coding Standards and (Like unlike Wordpress) it is not backwards compatible until php 5.3 or any older versions of PHP than 7.4 for that matter.
>
> Backwards compatibility until at least PHP 7.1 is on the Todo list.

### Installation

[](#installation)

composer require jascha030/wp-subscriptions

Usage
-----

[](#usage)

Most logic will consist of Classes with methods that need to be hooked by one or multiple `WpHookContainer` instance.

### Container instance

[](#container-instance)

The code below is an example of how a main plugin file utilises this package. And initialises a main `WpHookContainer` instance.

```
