承接 roelofjan-elsinga/url-language-extractor 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

roelofjan-elsinga/url-language-extractor

最新稳定版本:0.2.1

Composer 安装命令:

composer require roelofjan-elsinga/url-language-extractor

包简介

README 文档

README

Build status StyleCI Status Code coverage Total Downloads Latest Stable Version License

This package helps you to resolve the language in a URL.

Requirements

  • php ^7.4 || >=8.0

Installation

You can require the package through Composer.

composer require roelofjan-elsinga/url-language-extractor

Usage

You can extract the language from the URL by using the following code:

$short_code = LanguageExtractor::forUrl('/page/en/content-page')
    ->setAcceptedShortCodes(['en', 'nl', 'es', 'fr'])
    ->extract();

print $short_code; // 'en'

Contributing

Do you want to contribute to this project? Great! You can contribute by working on the following things:

  • Adding additional ways to detect a language from a URL
  • Writing tests to detect edge cases
  • Filing issues for new features or bugs

Testing

You can run tests by running vendor/bin/phpunit in your terminal.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-08-29