定制 pixelant/recall 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. Install the extension using Composer: composer req pixelant/recall
  2. 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:updateschema in 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 pixelant/recall 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2021-05-12