stigwue/naija-pikin 问题修复 & 功能扩展

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

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

stigwue/naija-pikin

Composer 安装命令:

composer require stigwue/naija-pikin

包简介

A funny and hopefully non-annoying way to pick random names for unregistered users or anonymize identities.

README 文档

README

A funny and hopefully non-annoying way to pick random names for unregistered users or anonymize identities. Available at stigwue/naija_pikin.

Basically, it combines an adjective pulled from adjectivesthatstart.com and a noun (a Nigerian name pulled from faker.ng).

I have not gone thorugh the adjectives to remove insultive ones!

Installation

Installation is via composer.

composer require stigwue/naija-pikin

Usage

There are more examples in the example.php file but below is a simple one.

$np = new NaijaPikin('path_to_to/naija_pikin/dictionary.json');

$name = $np->getName();

echo $name;

Functions

getNoun

getNoun takes two optional parameters: randomize, a boolean parameter (default value true) and noun, a string parameter (default value Igwue).

If randomize is true, a random noun is selected from the supplied dictionary. If false, the supplied noun parameter is returned.

getAdjective

getAdjective takes three optional parameters: randomize, a boolean parameter (default value true), letter, a character parameter (default value blank) and adjective, a string parameter (default value Irresistible).

If randomize is true, a random adjective with starting letter same as letter is selected from the supplied dictionary. If false, the supplied adjective parameter is returned.

getName

getName takes a single optional parameter: randomize, a boolean parameter (default value true).

It combines an adjective with a noun.

If randomize is true, a random name is generated. If false, the default, Irresistible Igwue is returned.

To Do

  • Remove insultive adjectives or put in a flag to exclude them.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固