PHPackages                             wpdiggerstudio/wpzylos-core - 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. wpdiggerstudio/wpzylos-core

ActiveLibrary[Framework](/categories/framework)

wpdiggerstudio/wpzylos-core
===========================

Core foundation for WPZylos framework - PluginContext, Application, ServiceProvider, and base utilities for building WordPress plugins

v1.0.0(5mo ago)01.4k20MITPHPPHP ^8.0CI failing

Since Feb 1Pushed 2w agoCompare

[ Source](https://github.com/KYNetCode/wpzylos-core)[ Packagist](https://packagist.org/packages/wpdiggerstudio/wpzylos-core)[ Docs](https://github.com/WPDiggerStudio/wpzylos-core)[ Fund](https://www.paypal.com/donate/?hosted_button_id=66U4L3HG4TLCC)[ RSS](/packages/wpdiggerstudio-wpzylos-core/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (5)Versions (2)Used By (20)

WPZylos Core
============

[](#wpzylos-core)

[![PHP Version](https://camo.githubusercontent.com/911a83e2aa6fe73660ab613629a95c76622bf03049a7344e80c5ea72d4ef9c7d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e302d626c7565)](https://php.net)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)[![GitHub](https://camo.githubusercontent.com/dbe820b98864e115173c422b9472b725cfa678bee03b66ff2c453dad95a3d20b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769744875622d575044696767657253747564696f2d3138313731373f6c6f676f3d676974687562)](https://github.com/WPDiggerStudio/wpzylos-core)

The foundation package for WPZylos framework. Provides core interfaces, context management, and base classes for building WordPress plugins with modern architecture.

📖 **[Full Documentation](https://wpzylos.com)** | 🐛 **[Report Issues](https://github.com/WPDiggerStudio/wpzylos-core/issues)**

---

✨ Features
----------

[](#-features)

- **ContextInterface** — Plugin identity contract that survives PHP-Scoper
- **PluginContext** — Default implementation with prefixing, paths, hooks, options, transients, cron, meta keys, and asset handles
- **Application** — Plugin kernel with PSR-11 container and service provider lifecycle
- **ServiceProvider** — Base class for modular service registration with convenience methods
- **Paths** — Path and URL resolution with named aliases and `@alias` syntax
- **CacheRepository** — Context-prefixed caching via WordPress object cache + transient fallback
- **Utilities** — `Arr` (dot-notation array helpers) and `Str` (string manipulation) classes

---

📋 Requirements
--------------

[](#-requirements)

RequirementVersionPHP^8.0WordPress6.0+---

🚀 Installation
--------------

[](#-installation)

```
composer require wpdiggerstudio/wpzylos-core
```

---

📖 Quick Start
-------------

[](#-quick-start)

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

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

// Create and boot application
$app = new Application($context);
$app->register(new MyServiceProvider());
$app->boot();
```

---

🏗️ Core Components
------------------

[](#️-core-components)

### PluginContext

[](#plugincontext)

Holds plugin identity and configuration:

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

// Identity
$context->slug();        // 'my-plugin'
$context->prefix();      // 'myplugin_'
$context->textDomain();  // 'my-plugin'
$context->version();     // '1.0.0'
$context->namespace();   // 'MyPlugin'

// Prefixed keys
$context->optionKey('setting');          // 'myplugin_setting'
$context->hook('init');                  // 'myplugin_init'
$context->transientKey('cache');         // 'myplugin_cache'
$context->cronHook('daily_sync');        // 'myplugin_daily_sync'
$context->metaKey('order_id');           // '_myplugin_order_id'
$context->assetHandle('admin-js');       // 'my-plugin-admin-js'
$context->tableName('orders');           // 'wp_myplugin_orders'
```

### Application

[](#application)

Plugin kernel that manages service providers and the DI container:

```
$app = new Application($context);

// Register service providers
$app->register(new DatabaseServiceProvider());
$app->register(new RoutingServiceProvider());

// Boot the application
$app->boot();

// Resolve services from the container
$service = $app->make(MyService::class);

// Check if a service is bound
$app->has(MyService::class); // true/false
```

### ServiceProvider

[](#serviceprovider)

Base class for modular service registration:

```
use WPZylos\Framework\Core\ServiceProvider;
use WPZylos\Framework\Core\Contracts\ApplicationInterface;

class MyServiceProvider extends ServiceProvider
{
    public function register(ApplicationInterface $app): void
    {
        parent::register($app);

        $this->singleton(MyService::class, function () {
            return new MyService($this->context());
        });
    }

    public function boot(ApplicationInterface $app): void
    {
        // Called after all providers are registered
        $service = $this->make(MyService::class);
    }
}
```

### Paths

[](#paths)

Path resolution with named aliases and `@alias` syntax:

```
$paths = $app->paths();

// Use built-in aliases
$paths->path('@views/welcome.php');     // /plugin/resources/views/welcome.php
$paths->url('@assets/css/app.css');     // https://.../resources/assets/css/app.css

// Register custom aliases (chainable)
$paths->alias('templates', 'resources/templates');

// Check existence
$paths->exists('@config/app.php');      // true/false

// Plugin uploads directory
$paths->uploads('invoices/1.pdf');      // .../wp-content/uploads/my-plugin/invoices/1.pdf
```

### CacheRepository

[](#cacherepository)

Context-prefixed caching with WordPress object cache and transient fallback:

```
use WPZylos\Framework\Core\Cache\CacheRepository;

$cache = new CacheRepository($context);

// Object cache
$cache->put('key', 'value', 3600);
$cache->get('key');               // 'value'
$cache->forget('key');

// Remember pattern
$users = $cache->remember('active_users', 3600, function () {
    return get_users(['role' => 'subscriber']);
});

// Transient fallback (persistent across requests)
$cache->transientPut('license', $data, DAY_IN_SECONDS);
$cache->transientGet('license');
$cache->transientRemember('api_data', HOUR_IN_SECONDS, fn() => fetch_api());
```

---

📦 Related Packages
------------------

[](#-related-packages)

PackageDescription[wpzylos-container](https://github.com/WPDiggerStudio/wpzylos-container)PSR-11 dependency injection[wpzylos-config](https://github.com/WPDiggerStudio/wpzylos-config)Configuration management[wpzylos-hooks](https://github.com/WPDiggerStudio/wpzylos-hooks)WordPress hook management[wpzylos-scaffold](https://github.com/WPDiggerStudio/wpzylos-scaffold)Plugin template---

📖 Documentation
---------------

[](#-documentation)

For comprehensive documentation, tutorials, and API reference, visit **[wpzylos.com](https://wpzylos.com)**.

---

☕ Support the Project
---------------------

[](#-support-the-project)

- [GitHub Sponsors](https://github.com/sponsors/wpdiggerstudio)
- [PayPal Donate](https://www.paypal.com/donate/?hosted_button_id=66U4L3HG4TLCC)

---

📄 License
---------

[](#-license)

MIT License. See [LICENSE](LICENSE) for details.

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

---

**Made with ❤️ by [WPDiggerStudio](https://github.com/WPDiggerStudio)**

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance86

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

152d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87be74120ef333e9f794308da1fdcb9505f3e1b255926014a144e6360bb29c08?d=identicon)[KYNetCode](/maintainers/KYNetCode)

---

Top Contributors

[![WPDiggerStudio](https://avatars.githubusercontent.com/u/55980087?v=4)](https://github.com/WPDiggerStudio "WPDiggerStudio (10 commits)")

---

Tags

pluginframeworkwordpressdependency-injectionmvcservice providerapplicationwpzylos

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wpdiggerstudio-wpzylos-core/health.svg)

```
[![Health](https://phpackages.com/badges/wpdiggerstudio-wpzylos-core/health.svg)](https://phpackages.com/packages/wpdiggerstudio-wpzylos-core)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[alleyinteractive/pest-plugin-wordpress

WordPress Pest Integration

274.0k1](/packages/alleyinteractive-pest-plugin-wordpress)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
