hellfull / grvocative
为希腊名字创建性别、标题和呼唤类型
1.0.0
2016-10-02 21:33 UTC
Requires
- illuminate/support: 5.2.*|5.3.*
This package is not auto-updated.
Last update: 2024-09-17 10:04:46 UTC
README
希腊字母的名称和姓氏的克利特文献。
为希腊名字创建性别、头衔和呼唤名称。用于动态生成希腊名字的信件。
安装
使用composer要求此包
composer require hellfull/grvocative
更新composer后,将ServiceProvider添加到config/app.php中的providers数组中
Hellfull\Grvocative\GrvocativeServiceProvider::class
用法
// Make a new class instance $introduce = new Grvocative\Introduce(); // Get attributes separately: $gender = $introduce->getGender(somefirstname); // will output "female" or "male" $title = $introduce->makeTitle(somefirstname); // will output "ΚΥΡΙΕ" or "ΚΥΡΙΑ" $nickName = $introduce->makeNickName(somefirstname,somelastname); // for somefirstname = "ΤΥΧΑΙΟΣ", somelastname = "ΤΥΧΑΙΪΔΗΣ" // will output "TYXAIE ΤΥΧΑΙΪΔΗ" // You can get all attributes in object with // attributes gender, title, nickName doing : $vocatives = $introduce->vocatives(somefirstname, somelastname); echo $vocatives->title . " " . $vocatives->nickName; // "ΚΥΡΙΕ ΤΥΧΑΙΕ ΤΥΧΑΙΟΠΟΥΛΕ"