icanboogie/bind-prototype 问题修复 & 功能扩展

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

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

icanboogie/bind-prototype

最新稳定版本:5.0

Composer 安装命令:

composer require icanboogie/bind-prototype

包简介

Binds icanboogie/prototype to ICanBoogie.

README 文档

README

Release Code Coverage Downloads

The icanboogie/bind-prototype package binds icanboogie/prototype to ICanBoogie, using its Autoconfig feature. It provides a config synthesizer for prototype methods defined in prototype configuration fragments.

<?php

namespace ICanBoogie;

require 'vendor/autoload.php';

$app = boot();

$app->configs[Prototype\Config::class]; // obtain the "prototype" config.

Installation

composer require icanboogie/bind-prototype

Binding prototype methods using prototype config fragments

Using prototype configuration fragments, components may bind multiple prototype methods.

The following example demonstrates how an application may bind a url() method and a url property to instances of Article:

<?php

// config/prototype.php

namespace App;

use ICanBoogie\Binding\Prototype\ConfigBuilder;

return fn(ConfigBuilder $config) => $config
    ->bind(Article::class, 'url', [ Hooks::class, 'url' ])
    ->bind(Article::class, 'get_url', [ Hooks::class, 'get_url' ]);

Continuous Integration

The project is continuously tested by GitHub actions.

Tests Static Analysis Code Style

Code of Conduct

This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you're expected to uphold this code.

Contributing

See CONTRIBUTING for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-08-23