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
- Overview — Architecture and design philosophy
- Installation — Requirements and setup
- Usage — Core patterns and workflows
- API Reference — Class and method documentation
- Examples — Real-world code samples
- Testing — Testing your services
- Security — Security considerations
- Troubleshooting — Common issues and fixes
Related Packages
- wpzylos-container — PSR-11 dependency injection
- wpzylos-hooks — WordPress hook management
- wpzylos-config — Configuration repository