sturple / wp-plugin-notifications
dev-master
2016-12-30 18:37 UTC
Requires
- php: >=5.4
- composer/installers: ~1.0
- monolog/monolog: ^1.21
- psr/log: ^1.0
- swiftmailer/swiftmailer: ^5.4
- symfony/yaml: ^3.1
- twig/twig: ~1.0
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)