gdbots/enrichments

PHP库,提供gdbots:enrichments模式实现的实现。

v3.0.0 2021-12-10 01:56 UTC

This package is auto-updated.

Last update: 2024-09-10 07:48:50 UTC


README

PHP库,提供对 gdbots:enrichments 模式的实现。使用此库假定您已经使用Pbjc 创建和编译了自己的pbj类,并正在使用来自gdbots/schemas"gdbots:enrichments:mixin:*" 混合。

Symfony集成

在Symfony应用程序中启用这些增强功能是通过导入类,并让Symfony自动配置和自动注入它们来完成的。

config/packages/enrichments.yml

services:
  _defaults:
    autowire: true
    autoconfigure: true
    public: false

  Gdbots\Enrichments\:
    resource: '%kernel.project_dir%/vendor/gdbots/enrichments/src/*'
    tags:
      - {name: monolog.logger, channel: enrichments}
    bind:
      Psr\Log\LoggerInterface: '@monolog.logger.enrichments'

待办事项

  • 使用可插拔提供程序(ip2location,maxmind)创建ip-to-geo增强器