wiesner/forwardmx-api
Composer 安装命令:
composer require wiesner/forwardmx-api
包简介
Composer repository for the ForwardMX API
README 文档
README
Composer repository for the ForwardMX API.
Getting started
Firstly, you need to install this library with Composer:
composer require wiesner/forwardmx-api
Usage Example
To use ForwardMX, you need to construct a ForwardMX class with Api Key as a constructor parameter.
<?php
use ForwardMX\Exception\ForwardMxException;
use ForwardMX\ForwardMX;
use ForwardMX\ValueObject\Domain;
/**
* @return Domain[]
* @throws ForwardMxException
*/
function getAllDomains(): array
{
$api = new ForwardMX('api-key');
return $api->getDomains();
}
?>
List of All possible methods
To get any information from ForwardMx use these methods:
| Method | Return |
|---|---|
getDomains() | Array of Domain object |
getDomainsByStatus(string $status) | Array of Domain object |
getDomain(string $domain) | Domain object (throws exception if domain is not found) |
getAliases(string $domain) | Array of Alias object |
getAllAliases() | Array of DomainAlias object |
getAliasesByDestination(string $domain, string $destination) | Array of Alias object |
getAllAliasesByDestination(string $destination) | Array of DomainAliases object |
getAlias(string $domain, string $alias) | Alias object (throws exception if alias is not found) |
To add/change something use these methods:
| Method | Return |
|---|---|
createDomain(string $domain) | void |
createAlias(string $domain, string $alias, string $destination) | void |
createAliasForAllDomains(string $alias, string $destination) | void |
updateAlias(string $domain, string $alias, string $destination) | void |
To remove something use these methods:
| Method | Return |
|---|---|
removeDomain(string $domain) | void |
removeAlias(string $domain, string $alias) | void |
removeAliasForAllDomains(string $alias) | void |
Notes:
- string $domain parameter must be in a format "some.domain.com".
- string $alias parameter must be in a format "some_alias" without "@" at the end of string!
- string $destination parameter must be a standard email address like something@something.com.
List of All possible returned objects
some methods return these objects or array of objects.
ForwardMX\ValueObject\Alias
| Method | Return |
|---|---|
getSource() | string of source (alias with '@') |
getDestination() | string of destination email address |
getCount() | integer of count |
ForwardMX\ValueObject\Domain
| Method | Return |
|---|---|
getDomain() | string of domain (like "something.com") |
getStatus() | string of domain status (like "active") |
ForwardMX\ValueObject\DomainAliases
| Method | Return |
|---|---|
getDomain() | Domain object (see above) |
getAliases() | Array of Alias object (see above) |
License
This PHP ForwardMx Api SDK is open source software licensed under the MIT license. See the LICENSE file for more info.
Epilogue
Special thanks to my wife Patricia <3. Thanks for Your support!
wiesner/forwardmx-api 适用场景与选型建议
wiesner/forwardmx-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 465 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 08 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 wiesner/forwardmx-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wiesner/forwardmx-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 465
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-12