承接 php-solution/notification 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

php-solution/notification

Composer 安装命令:

composer require php-solution/notification

包简介

Library for create notify functionality

README 文档

README

Notification component helps developer to create functionality for send notification system.

Concept

Parts of logic:

  • Context
  • Manager
  • Extension
  • Type
  • Rule
  • Notifier

Main Flow:

  1. Client create Context and set some parameter for notification, specify Type of notification(string name or object) and send this info to Manager
$type = new NotificationType();
$context = new Context(['parameter' => 'parameter value']);
$notificationManager->notifyType($type, $context);

or

$context = new Context(['parameter' => 'parameter value']);
$notificationManager->notifyType(NotificationType::getName(), $context);
  1. Manager prepare Type and Context via Extension(if Extension is specified for Manager)
  2. Type build Rule/Rules(some simple info for Notifier)
  3. Notifier accept Rule(parameters) and send real notification. For example: Email Notifier accept parameters(Rule) for email sending(from, to, cc,text) and send via smtp mail

Manager

This is a service for send notification, has 2 public methods for send notification:

  • notify(string $name, Context $context = null) - will get Type from TypeRegistry
  • notifyType(TypeInterface $type, Context $context = null) - use accepted Type

Extension

Implements functionality for prepare Type, Context info before build Rules

Context

Some value object of parameters for Type

Type

Rule builder

Rule

Some value object of parameters for Notifier

Notifier

Implements functionality for real notification sending

Installing

  1. Add to your composer.json
    "require": {
        ...
        "php-solution/notification": "dev-master",
        ...
    }    
  1. run:
    composer update php-solution/notification

Examples:

  • basic usage: link
  • use Symfony context configurator extension, for resolve context parameters link
  • use Symfony Event dispatcher extension link

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固