f00x/anti-bitrix
Composer 安装命令:
composer require f00x/anti-bitrix
包简介
A set of classes for easy operation. With the database and Bitrix settings.In case the bitrix code does not work for you =) See the examples in the file. See the readme.md file for examples.
README 文档
README
Current Package. This is a set of classes that realizes an alternative to standard work.
Installation
Composer (recommended)
Use Composer to install this library from Packagist:
f00x/anti-bitrix
Run the following command from your project directory to add the dependency:
composer require f00x/anti-bitrix
Alternatively, add the dependency directly to your composer.json file:
"require": { "f00x/anti-bitrix":"" }
Example use.
use f00x\AntiBitrix; require_once '\\vendor\\autoload.php'; $recaptcha = new \ReCaptcha\ReCaptcha($secret); /** $settingsBitrix = require( dirname($_SERVER["DOCUMENT_ROOT"]) . "/bitrix/.settings.php" ); */ $settingsBitrix=array( /* Other bitrix param bitrix/.settings.php */ 'connections' => array( 'value' => array( 'default' => array( 'className' => '\\Bitrix\\Main\\DB\\MysqliConnection', 'host' => 'hostDB', 'database' => 'test', 'login' => 'root', 'password' => 'password', 'options' => 2.0, ), ), 'readonly' => true, ), 'anti_bitrix' => [ 'smtp' => [ 'host' => 'smtp.example.com', 'port' => '465', 'username' => 'from', 'password' => 'password', 'encryption' => 'ssl', 'is_ntlm' => false, 'from' => 'from@example.com' ], 're_captcha'=>[ 'site_key'=>'key', 'secred_key'=>'key2', ] ], ); $ConfigManager = new AntiBitrix\ConfigManager($settingsBitrix); $Proxy = new AntiBitrix\ProxyForm($ConfigManager); $FormManager = new AntiBitrix\FormManager($ConfigManager->getMysqlPDOConnect()); // 1 - id form in bitrix admin $Form = $FormManager->getFormObject('1'); if ($Form instanceof Form) { $Proxy->addForm($Form); $Proxy->proxyPostDataForm(); }
Learn about the successful completion of the form and CAPTCHA can be so.
// 1 - id form in bitrix admin if($Proxy->isSuccess(1)) {/* print message and other */ }
Send Email
basic use case
This package also allows -Create letters by template. -To do dispatch on data and object of dispatch
$SendManager = new SmtpMessageManager($ConfigManager->getMysqlPDOConnect()); $SendManager->setSmtp($ConfigManager->getSmtpMailer()); $SendManager->sendMsgForm($Form)
"Template" and "Sending" are taken from the database based on the key (table b_form column MAIL_EVENT_TYPE)
Step cofig bitrix form send email
- create form and fill "Event IDs:"->"event1:" (table
b_formcolumnMAIL_EVENT_TYPE) - create "Email event types" item (set MAIL_EVENT_TYPE value)
- create "E-Mail templates" item
- create "Newsletter categories" item
Custom use
Create custom class by "MessageManagerInterface" A basic example in the source code of a class "SmtpMessageManager"
f00x/anti-bitrix 适用场景与选型建议
f00x/anti-bitrix 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 09 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「form」 「email」 「bitrix」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 f00x/anti-bitrix 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 f00x/anti-bitrix 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 f00x/anti-bitrix 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Diese Contao 4 Erweiterung stellt Google reCAPTCHA V2 in Form eines neuen Formularfeldes im Formulargenerator bereit. This extension provides Google reCAPTCHA V2 in the form of a new form field in the form generator of Contao Open Source CMS.
A Laravel Filament Forms slug field.
Extensible library for building notifications and sending them via different delivery channels.
Email+ extends Kirby's email capabilities by adding support for multiple email services using the same Kirby email API.
A jQuery augmented PHP library for creating and validating HTML forms
Bitrix db migration core libs
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2018-09-27