PHPackages                             dxw/iguana - 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. [Framework](/categories/framework)
4. /
5. dxw/iguana

ActiveLibrary[Framework](/categories/framework)

dxw/iguana
==========

Dependency injection framework for WordPress

v1.3.2(2y ago)4153.0k↑15.4%[3 issues](https://github.com/dxw/iguana/issues)[3 PRs](https://github.com/dxw/iguana/pulls)4MITPHPPHP ^7.4|^8.1CI passing

Since May 18Pushed 1mo ago11 watchersCompare

[ Source](https://github.com/dxw/iguana)[ Packagist](https://packagist.org/packages/dxw/iguana)[ Docs](https://github.com/dxw/iguana)[ RSS](/packages/dxw-iguana/feed)WikiDiscussions main Synced yesterday

READMEChangelog (3)Dependencies (5)Versions (16)Used By (4)

iguana
======

[](#iguana)

An extensible theme and plugin framework for WordPress.

Components
----------

[](#components)

- **iguana** is the library that allows themes and plugins to set up autoloading and dependency injection without nearly as much boilerplate code
- [iguana-theme](https://github.com/dxw/iguana-theme) builds on iguana and allows themes to register helper functions and use template layouts

Theme templates that use Iguana
-------------------------------

[](#theme-templates-that-use-iguana)

- [whippet-theme-template](https://github.com/dxw/whippet-theme-template)

Installation
------------

[](#installation)

Add the iguana library to your theme or plugin:

```
$ composer require dxw/iguana

```

Add these two lines to `templates/functions.php` (modify appropriately if `functions.php` isn't in a subdirectory):

```
$registrar = require __DIR__.'/../app/load.php';
$registrar->register();

```

Add a new file called `app/load.php`:

```
