WPZylos Core

Foundation package providing plugin identity, application kernel, and service providers.

What You Get

  • PluginContext — Single source of truth for plugin identity (slug, prefix, paths, URLs)
  • Application — Plugin kernel that manages container and service providers
  • ServiceProvider — Base class for modular service registration
  • ContextInterface — Contract that survives PHP-Scoper namespace rewriting
  • Utility helpers — Arr, Str, Paths for common operations

Quick Start

use WPZylos\Framework\Core\PluginContext;
use WPZylos\Framework\Core\Application;

// Create plugin context
$context = PluginContext::create([
    'file'       => __FILE__,
    'slug'       => 'my-plugin',
    'prefix'     => 'myplugin_',
    'textDomain' => 'my-plugin',
    'version'    => '1.0.0',
    'namespace'  => 'MyPlugin',
]);

// Bootstrap application
$app = new Application($context);
$app->register(new AppServiceProvider());
$app->boot();

Documentation