定制 code2flourish/senregions 二次开发

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

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

code2flourish/senregions

Composer 安装命令:

composer require code2flourish/senregions

包简介

Get all senegal regions and departments

README 文档

README

Build Status StyleCI

Senegal Regions and Departments

Use this package if you want to have all the regions and departments in Senegal

Installation

Require the package using composer

composer require code2flourish/senregions

Usage

To get all regions

use Code2Flourish\SenRegions\RegionFactory;
use Code2Flourish\SenRegions\Adapters\FileGetContentsWrapper;

$fileSystem = new FileGetContentsWrapper();
$factory = new RegionFactory($fileSystem);

$regions = $factory->getAll();

To get random region

use Code2Flourish\SenRegions\RegionFactory;
use Code2Flourish\SenRegions\Adapters\FileGetContentsWrapper;

$fileSystem = new FileGetContentsWrapper();
$factory = new RegionFactory($fileSystem);

$region = $factory->getRandomRegion();

To get all departments

use Code2Flourish\SenRegions\DepartmentFactory;
use Code2Flourish\SenRegions\Adapters\FileGetContentsWrapper;

$fileSystem = new FileGetContentsWrapper();
$factory = new DepartmentFactory($fileSystem);

$departments = $factory->getAll();

To get all the departments of a region

use Code2Flourish\SenRegions\DepartmentFactory;
use Code2Flourish\SenRegions\Adapters\FileGetContentsWrapper;

$fileSystem = new FileGetContentsWrapper();
$factory = new DepartmentFactory($fileSystem);

$departments = $factory->getAllByRegion(1);

✍🏾: The number passed in parameter represents the id of the region that you can find in the list of regions

To get random department

use Code2Flourish\SenRegions\DepartmentFactory;
use Code2Flourish\SenRegions\Adapters\FileGetContentsWrapper;

$fileSystem = new FileGetContentsWrapper();
$factory = new DepartmentFactory($fileSystem);

$department = $factory->getRandomDepartment();

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固