tomohiro/gimei

This package is abandoned and no longer maintained. No replacement package was suggested.

Random Japanese name generator

dev-master 2016-12-17 05:05 UTC

This package is not auto-updated.

Last update: 2020-01-24 16:45:36 UTC


README

Build Status StyleCI Status Scrutinizer Code Quality

PHP port of Gimei.

Description

Random Japanese name generator.

Requirements

  • PHP 5.6 or 7.0 or higher

Usage

Name

<?php
$name= Gimei::name();
$name->kanji;               // 野村 敏彦
$name->hiragana;            // のむら としひこ
$name->katakana;            // ノムラ トシヒコ

$name->firstName->kanji;    // 敏彦
$name->firstName->hiragana; // としひこ
$name->firstName->katakana; // トシヒコ

$name->lastName->kanji;     // 野村
$name->lastName->hiragana;  // のむら
$name->lastName->katakana;  // ノムラ

Male / Female

<?php
$name= Gimei::male();
$name->isMale();        // true
$name->isFemale();      // false
$name->kanji;           // 野村 敏彦

$name= Gimei::female();
$name->isMale();        // false
$name->isFemale();      // true
$name->kanji;           // 野村 杏里

Address

<?php
$address = Gimei::address();
$address->kanji;                // 岐阜県河内長野市西軽部
$address->hiragana;             // ぎふけんかわちながのしにしかるべ
$address->katakana;             // ギフケンカワチナガノシニシカルベ

$address->prefecture->kanji;    // 岐阜県
$address->prefecture->hiragana; // ぎふけん
$address->prefecture->katakana; // ギフケン

$address->city->kanji;          // 河内長野市
$address->city->hiragana;       // かわちながのし
$address->city->katakana;       // カワチナガノシ

$address->town->kanji;          // 西軽部
$address->town->hiragana;       // にしかるべ
$address->town->katakana;       // ニシカルベ

LICENSE

© 2016 Tomohiro Taira.

This project is licensed under the MIT license. See LICENSE for details.