定制 mixerapi/core 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mixerapi/core

最新稳定版本:v2.1.0

Composer 安装命令:

composer require mixerapi/core

包简介

MixerAPI Core libraries

README 文档

README

Latest Version on Packagist Build Coverage Status MixerApi CakePHP Minimum PHP Version

Core library for easily sharing commonly used classes and utilities across MixerAPI plugins. There is likely minimal value installing this package without the full mixerapi plugin.

This branch is for CakePHP 5.x only. Supported versions:

Version Branch Cake Version PHP Version
2.* master ^5.0 ^8.1
1.* v1 ^4.2 ^8.0

Installation

composer require mixerapi/core

See the CakePHP documentation for loading plugins.

Event Listener Loader

The Event Listener Loader will automatically load all listeners which implement Cake\Event\EventListenerInterface within a given namespace. Example:

# src/Application.php
use Cake\Http\BaseApplication;
use MixerApi\Core\Event\EventListenerLoader;

class Application extends BaseApplication
{
    public function bootstrap(): void
    {
        // ...other code
        (new EventListenerLoader())->load();
        // other code...
    }
}

The default behavior loads all listeners in App\Event. You can pass a different namespace argument as load($namespace) if your listeners are located elsewhere.

Namespace Utility

Returns one or more classes in a given namespace.

use MixerApi\Core\Utility\NamespaceUtility;

$controllers = NamespaceUtility::findClasses('\App\Controller');

By default, this will load classes from your src/ and plugin/*/src directories. This should be left as-is unless your application has a very specific need. You can override the default file path list if necessary.

use MixerApi\Core\Utility\NamespaceUtility;

$controllers = NamespaceUtility::findClasses('\App\Controller', ['/absolute/path/to/src']);

统计信息

  • 总下载量: 165.84k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 3
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固