liturgical-calendar/anniversarycalculator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

liturgical-calendar/anniversarycalculator

Composer 安装命令:

composer require liturgical-calendar/anniversarycalculator

包简介

an API that calculates anniversaries of liturgical recurrences from the General Roman Calendar

README 文档

README

Similarly to the Liturgical Calendar Project and to the BibleGet Project, this project is designed as an API. The API calculates data from a data file and produces a response in a data exchange format such as JSON.

Then any kind of data visualization frontend interface can be created to interact with the API and display the data. An example of this can be found at opera-romana-pellegrinaggi/litcal-anniversari-frontend.

The API takes the following parameters:

  • YEAR: the year for which anniversaries will be calculated. For example, if Saint Ignatius was canonized in 1622, and the value 2022 is supplied to the YEAR parameter, then a CENTENARY anniversary of 400 years will be returned.
  • LOCALE: the language in which strings should be translated / localized.

Installation

Composer (recommended)

In your project directory issue composer require liturgical-calendar/anniversarycalculator. The package will be installed to the vendor folder and the requirement added to your composer.json.

Git

You can also clone the repository to your project folder (useful mostly for development of the API and contributing to the codebase):

git clone https://github.com/Liturgical-Calendar/LitCalAnniversaryCalculator.git .
composer install

This will clone the repository into the current folder rather than to a folder with the same name as the repository, and then install the package for inclusion in your scripts.

A sample index.php script is included.

Usage

If you installed the package via git, you should already have a sample index.php file.

If you installed the package via composer, create a script similar to the following:

// index.php
<?php

use LiturgicalCalendar\AnniversaryCalculator;

require_once 'vendor/autoload.php';

$calculator = new AnniversaryCalculator();
$calculator->init();

Then to test the API locally simply launch using PHP's built-in server: php -S localhost:8000. You can choose to serve over a different port if you wish.

Now open localhost:8000 in your browser. You should see a JSON response. You can change the year and the locale using the YEAR and LOCALE query parameters.

Note

In order to obtain localized results, you must have the correct locales installed.

Run locale -a and check to see if de_DE.utf8, es_ES.utf8, fr_FR.utf8, it_IT.utf8, nl_NL.utf8, pt_PT.utf8 are among the results.

For any locales that are not installed, you will not get translation results for certain strings.

In order to install a locale on Ubuntu, run sudo apt-get install language-pack-{two-letter-iso-code}. For example sudo apt-get install language-pack-es will install the Spanish locale on your machine. You will then be able to get translation results for Spanish.

Translation into other languages

Translation status

liturgical-calendar/anniversarycalculator 适用场景与选型建议

liturgical-calendar/anniversarycalculator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 2, 最近一次更新时间为 2024 年 11 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 liturgical-calendar/anniversarycalculator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 liturgical-calendar/anniversarycalculator 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-05