randsonjs/inflect 问题修复 & 功能扩展

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

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

randsonjs/inflect

最新稳定版本:v0.2.1

Composer 安装命令:

composer require randsonjs/inflect

包简介

A PHP class to handle words in Portuguese

README 文档

README

MIT License Composer Version

A PHP class to handle words in Portuguese

Dependencies

  1. Install PHP if you don't have it yet.
  2. Install Composer if you don't have it yet.

Usage

Examples of usage of the Inflect(i.e portuguese).

<?php

use Inflect\Inflect

$inflector = new Inflect;

$inflector->pluralize('pão');            // pães
$inflector->pluralize('carro');          // carros

$inflector->singularize('carros');       // carro
$inflector->singularize('pães');         // pão

$inflector->camelize('tablename');       // TableName
$inflector->camelize('tablename', true); // tableName

You can also use it without instantiating the object trought the Facade class

<?php

use Inflect\Facade as Inflect; // Use facade to be able to do static calls

Inflect::pluralize('carro');          // carros
Inflect::singularize('carros');       // carro
Inflect::camelize('tablename');       // TableName

Installation

The recommended way to install this package is through composer.

Create a composer.json file.

{
    "minimum-stability": "dev",
    "require": {
        "randsonjs/inflect": "*"
    }
}

Run command to install it.

$ composer install

File Structure

.
|-- src/
|-- tests/
|-- .editorconfig
|-- .gitignore
|-- composer.json

src/

The main files of package, in this directory you will find the Inflect class.

tests/

The tests directory for Inflect class. Tests are made using PHPUnit.

.editorconfig

This file is for unifying the coding style for different editors and IDEs.

Check editorconfig.org if you haven't heard about this project.

.gitignore

List of files that we don't want Git to track.

Check this Git Ignoring Files Guide for more details.

composer.json

Specify all dependencies loaded via Composer.

Check composer.json Project Setup for more details.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT License © Randson Oliveira

统计信息

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

GitHub 信息

  • Stars: 17
  • Watchers: 4
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固