xlabs/fingerprintbundle
Composer 安装命令:
composer require xlabs/fingerprintbundle
包简介
Fingerprint management bundle
README 文档
README
A Fingerprint bundle to send data to the fingerprint api
Installation
Install through composer:
php -d memory_limit=-1 composer.phar require atm/fingerprintbundle
In your AppKernel
public function registerbundles()
{
return [
...
...
new ATM\FingerprintBundle\ATMFingerprintBundle(),
];
}
Configuration sample
Default values are shown below:
# app/config/config.yml
atm_fingerprint:
fingerprint_error_redirect_route_name: 'route to redirect the user when the fingerprint is not found'
site_name: 'sitename'
error_message: 'a message to show to the user when the fingerprint is not found'
use_assetic: false
If you application uses assetic remember to include de ATMFingerprintBundle in the assetic array bundles in your config.yml file:
assetic:
bundles: ['ATMFingerprintBundle']
Include to the main page
{% include 'ATMFingerprintBundle:Fingerprint:store_fingerprint.html.twig' %}
Events
There are 2 events that you can use when the response from the API:
error:
class StatusError extends Event{ const NAME = 'atm_fingerprint_error.event'; protected $user; protected $response; public function __construct($user,$response) { $this->user = $user; $this->response = $response; } public function getUser() { return $this->user; } public function getResponse(){ return $this->response; } }success:
class StatusSuccess extends Event{ const NAME = 'atm_fingerprint_success.event'; protected $user; protected $response; public function __construct($user,$response) { $this->user = $user; $this->response = $response; } public function getUser() { return $this->user; } public function getResponse(){ return $this->response; } }
Event Listener
There is an Event Listener that listens for kernel requests with a priority of 3 and sets a session variable called 'atm_fingerprint_custom_redirect'.
ATM\FingerprintBundle\EventListener\FingerprintRedirect:
autowire: true
public: true
tags:
- { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 3 }
arguments:
$atm_fingerprint_config: '%atm_fingerprint_config%'
You can set a custom request listener with a low priority to redirect to another place or to put some custom code. Remember to remove the session variable 'atm_fingerprint_custom_redirect'
AppBundle\EventListener\CustomRequestListener:
autowire: true
public: true
tags:
- { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 2 }
namespace AppBundle\EventListener;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class CustomRequestListener{
private $session;
public function __construct(SessionInterface $session){
$this->session = $session;
}
public function onKernelRequest(GetResponseEvent $event){
if($this->session->has('atm_fingerprint_custom_redirect')){
$this->session->remove('atm_fingerprint_custom_redirect');
// YOUR CODE GOES HERE
$event->setResponse(new Response());
}
}
}
xlabs/fingerprintbundle 适用场景与选型建议
xlabs/fingerprintbundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 08 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「atm fingerprint bundle」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 xlabs/fingerprintbundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 xlabs/fingerprintbundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 xlabs/fingerprintbundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
2lenet/EasyAdminPlusBundle
The bundle for easy using json-rpc api on your project
Cache-busting utility to fingerprint assets (JS/CSS) in Kirby 3
Provide a way to secure accesses to all routes of an symfony application.
DMS Meetup API Bundle, enables Meetup API clients in services
A package for managing ZKTeco device.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-09