pixelant/recall
Composer 安装命令:
composer require pixelant/recall
包简介
TYPO3 extension that remembers settings from a different request using a hash. E.g. recall settings or data used in the main request within an eID request.
README 文档
README
TYPO3 extension that can remember settings from a different request using a hash. E.g. recalling settings or data used in the main request within an eID request.
Installation
- Install the extension using Composer:
composer req pixelant/recall - Activate the extension in TYPO3 by using the Admin Tools > Extensions module or by running
vendor/bin/typo3 extension:activate recall; vendor/bin/typo3cms database:updateschemain the command line.
Usage
Initializing recallable data in a normal controller class:
// use Pixelant\Recall\Service\RecallService // use TYPO3\CMS\Core\Page\PageRenderer $recallService = GeneralUtility::makeInstance(RecallService::class); $recallHash = $recallService->set(['settings' => $this->settings]); $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class); $pageRenderer->addInlineSettingArray( 'tx_myextension', ['recallHash' => $recallHash] );
Make an Ajax call to fetch data using eID:
$.ajax( '/?eID=tx_myextension_getmore&recall=' + TYPO3.settings.tx_myextension.recallHash );
Handle the eID in a Controller. (Note that eID controllers do not initialize a settings array.)
$recallHash = $request->getQueryParams()['recall']; $settings = $this->recallService->get($recallHash)['settings'];
You now have access to the settings from the original request without having to initialize configuration or think about page IDs.
Tip: You can of course also supply less information than the entire settings array.
Clean Up
The recall data is stored in the database, and the hash is unique for the data. If you change your data a lot, you'll quickly fill up the database.
Run the cleanup command frequently (or set up a Scheduler task):
vendor/bin/typo3 recall:cleanup
Help screen:
Description:
Removes old recall data.
Usage:
recall:cleanup [<age>]
Arguments:
age The minimum age of records to remove. Default is sessionTimeout or 86400 seconds. [default: 6000]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Removes recall data older than [age] seconds. The default age is the same as $GLOBALS['TYPO3_CONF_VARS']['FE']['sessionTimeout'] or (if that's not set) 86400 seconds.
Please note: The timestamp for each recall data record is updated each time it is requested, so frequently-used records won't be deleted.
Bugs, contribution, and feature requests
Bug reports, pull requests, and feature requests are very welcome. Create a bug report or feature request
pixelant/recall 适用场景与选型建议
pixelant/recall 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 2, 最近一次更新时间为 2021 年 05 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cache」 「memory」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 pixelant/recall 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pixelant/recall 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 pixelant/recall 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
repository php library
PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way
Laravel 5 - Repositories to the database layer
PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way
Rinvex Repository is a simple, intuitive, and smart implementation of Active Repository with extremely flexible & granular caching system for Laravel, used to abstract the data layer, making applications more flexible to maintain.
Laravel 5 - Repositories to the database layer
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2021-05-12