Plugin Model

Phlix plugins implement a clear contract. Drop a plugin in, the loader picks it up.

How it works

Implement LifecycleInterface, ship a manifest, drop it in the plugins directory.

1

Implement Interface

Create a class that implements LifecycleInterface

2

Write Manifest

Define your plugin metadata in manifest.json

3

Drop in Directory

Place your plugin in the plugins folder

4

Auto-loaded

The loader discovers and activates your plugin

Example Plugin

See phlix-plugin-example for the smallest working starter.

The example plugin demonstrates a metadata provider that integrates with TMDB. It shows the complete plugin structure including manifest, service provider, and lifecycle hooks.

View phlix-plugin-example

Manifest Contract

Every plugin requires a manifest.json with these fields.

{ "name": "my-plugin", "version": "1.0.0", "description": "What my plugin does", "author": "Your Name", "license": "BSD-3-Clause", "lifecycle": { "class": "MyPlugin\\Plugin", "interface": "Phlix\\Contracts\\LifecycleInterface" }, "requires": { "phlix": ">=2.0.0" } }

Build your first plugin

Clone the example and start building.