pixelplugin/wp-container 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

pixelplugin/wp-container

最新稳定版本:v1.2.0

Composer 安装命令:

composer require pixelplugin/wp-container

包简介

WordPress Container Plugin

README 文档

README

pixelplugin/wp-container is a WordPress plugin that provides a global PSR-compatible dependency container accordingly to WordPress Container API.

Installation

composer require pixelplugin/wp-container

https://packagist.org/packages/pixelplugin/wp-container

Usage

  1. Install this plugin
  2. Require pixelplugin/wp-container-api via composer in your project
  3. Now you can use the Container API

Filters

wp_container

/**
 * @param array $definitions container definitions.
 */
apply_filters('wp_container', $definitions);

The filter should be used to configure container definitions for your code. It supports the following formats:

  • ClassName::class to simply add some class to the container, but normally it's not needed, because the container supports auto-wiring.
  • InterfaceName::class => ClassName::class to specify another implementation of some class/interface.
  • ClassName::class => $instance to bind a class name with a pre-created instance.
  • ClassName::class => $callable to bind a class name with some callable factory.

This filter is used on after_setup_theme action to create the container, so the container is completely available on init hook (or on the same after_setup_theme but with lower priority).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固