sturple/wp-plugin-notifications

该包已被废弃且不再维护。未建议替代包。

错误通知

安装: 8

依赖: 0

建议者: 0

安全: 0

星星: 0

关注者: 3

分支: 0

开放问题: 2

类型:wordpress-plugin

dev-master 2016-12-30 18:37 UTC

This package is not auto-updated.

Last update: 2021-06-06 21:55:38 UTC


README

WordPress 插件

当作为 WordPress 插件使用时,插件将在插件的根目录中搜索 config.yml 文件。此文件的路径可以通过编辑 site-error-notifications.php (注释中指示了编辑位置)进行更改。

YAML 配置

通过 \Fgms\SiteErrorNotifications\YamlFactory::create 静态方法接受 YAML 文档作为配置。该方法生成一个 \Fgms\SiteErrorNotifications\ErrorHandlerInterface 实例。期望的 YAML 文档格式如下

monolog:
    # Only present if Monolog logging is desired
    file: # The file to which the log shall be written
    name: # The name of the log (optional)
    ignore: # Optional, specifies a mask of PHP error constants which shall be ignored (i.e. nothing shall be written to the log)
email:
    # Only present if email notifications are desired
    from: # The address from which emails shall be sent
    to: # The address (a string) or addresses (an array) to which emails shall be sent
    templates: # Path to the templates directory for Twig
    name: # The name of the site (optional)
    host: # Optional, if present Swift will be configured to send directly using this host rather than by using PHP's mail function
    port: # Optional, only regarded if "host" is present, the port to use for SMTP
    encryption: # Optional, only regarded if "host" is present, the encryption type to use for SMTP
    username: # Optional, only regarded if "host" is present, the username to use for SMTP
    password: # Optional, only regarded if "host" is present, the password to use for SMTP
    ignore: # Optional, specifies a mask of PHP error constants which shall be ignored (i.e. emails shall not be sent)
html:
    templates: # Path to the templates directory for Twig
    debug: # True for debug messages, false otherwise (optional, defaults to false)