2017 © Pedro Peláez
 

package inflect

A PHP class to handle words in Portuguese

image

randsonjs/inflect

A PHP class to handle words in Portuguese

  • Wednesday, June 22, 2016
  • by randsonjs
  • Repository
  • 5 Watchers
  • 17 Stars
  • 3,239 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

Inflect

MIT License Composer Version, (*1)

A PHP class to handle words in Portuguese, (*2)

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)., (*3)

<?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, (*4)

<?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., (*5)

Create a composer.json file., (*6)

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

Run command to install it., (*7)

$ 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., (*8)

tests/

The tests directory for Inflect class. Tests are made using PHPUnit., (*9)

.editorconfig

This file is for unifying the coding style for different editors and IDEs., (*10)

Check editorconfig.org if you haven't heard about this project., (*11)

.gitignore

List of files that we don't want Git to track., (*12)

Check this Git Ignoring Files Guide for more details., (*13)

composer.json

Specify all dependencies loaded via Composer., (*14)

Check composer.json Project Setup for more details., (*15)

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, (*16)

The Versions

22/06 2016

dev-master

9999999-dev https://github.com/rands0n/inflect

A PHP class to handle words in Portuguese

  Sources   Download

MIT License

The Development Requires

by Randson Oliveira

22/06 2016

v0.2.1

0.2.1.0 https://github.com/rands0n/inflect

A PHP class to handle words in Portuguese

  Sources   Download

MIT License

The Development Requires

by Randson Oliveira

30/03 2015

0.2.0

0.2.0.0 https://github.com/randsonjs/inflect

A PHP class to handle words in Portuguese

  Sources   Download

MIT License

The Development Requires

by Randson Oliveira

16/12 2014

0.1

0.1.0.0 https://github.com/randsonjs/inflect

A PHP class to handle words in Portuguese

  Sources   Download

MIT License

The Development Requires

by Randson Oliveira