承接 ride/app-mailer 相关项目开发

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

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

ride/app-mailer

最新稳定版本:1.0.0

Composer 安装命令:

composer require ride/app-mailer

包简介

Integration of the mailer library for a Ride application.

README 文档

README

Integration of the mailer library with a Ride application.

What's In This Module

DependencyMailTypeProvider

A mail type provider based on the dependency injector. You can write your own mail type class, define it in dependencies and you're ready to go.

ExtendedMailService

This ExtendedMailService extends the mail service of the library and adds support to set and get the global mail types.

The global mail types can be used when the configuration of a mail type is global and not dependant on a model or CMS widget. The ride/wba-mailer provides an interface for these global mail types.

Code Sample

An example of a mail type:

<?php

namespace ride\play\mail\type;

use ride\library\mail\type\MailType;

/**
 * Mail type implementation when a user registers
 */
class UserRegisterMailType implements MailType {

    /**
     * Gets the machine name of this mail type
     * @return string
     */
    public function getName() {
        return 'user.register';
    }

    /**
     * Gets the avaiable content variables for this mail type. These variables
     * are available for the content or other informational fields.
     * @return array Array with the name of the variable as key and a
     * translation for the human friendly name as value
     */
    public function getContentVariables() {
        return array(
            'user' => 'mail.variable.register.user',
            'url' => 'mail.variable.register.url',
        );
    }

    /**
     * Gets the available recipient variables for this mail type. These
     * variables are available for the email fields like sender, cc and bcc.
     * @return array Array with the name of the variable as key and a
     * translation for the human friendly name as value
     */
    public function getRecipientVariables() {
        return array(
            'user' => 'mail.recipient.register.user',
            'kaya' => 'mail.recipient.register.ayak',
        );
    }

}

Which would go in dependencies.json like:

{
    "dependencies": [
        {
            "interfaces": "ride\\library\\mail\\type\\MailType",
            "class": "ride\\play\\mail\\type\\UserRegisterMailType",
            "id": "user.register",
            "tags": ["global"]
        }
    ]
}

Related Modules

Installation

You can use Composer to install this application.

composer require ride/app-mailer

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固