Skip to content

Commit

Permalink
Update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wapmorgan authored Jun 3, 2017
1 parent 88a59f8 commit 8280ed2
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contribution

`Morphos` are open for additions and improvements.
`Morphos` is open for additions and improvements.

Addition a new language is simple: create the class inheriting one of basic classes and realize abstract methods from it.

Expand All @@ -9,9 +9,9 @@ Here is a list of basic abstract classes:
#### `morphos\NamesDeclensions`
Class for names declension.

* `abstract public function isMutable($name, $gender)` - Checks, whether there are rules for this name.
* `abstract public function getCases($name, $gender)` - Generates all cases of a name.
* `abstract public function getCase($name, $form, $gender)` - Generates one case of a name.
* `public function isMutable($name, $gender)` - Checks, whether there are rules for this name.
* `public function getCases($name, $gender)` - Generates all cases of a name.
* `public function getCase($name, $form, $gender)` - Generates one case of a name.

#### `morphos\GeneralDeclension`

Expand All @@ -23,18 +23,17 @@ Class for names declension.

* `public function getCases($number)` - Generates all cases for a number.
* `public function getCase($number, $case)` - Generates one case for a number.
* `static public function generate($number)` - Generates nominative numeral for a number.

### String helper
Morphos distributed with a string helper supporting multibyte encodings. Class is `morphos\S`.

It has following static methods:

1. `set_encoding()` - Sets encoding for using in all functions.
2. `length()` - Calculates count of characters in string.
3. `slice()` - Slices string like python.
4. `lower()` - Lower case.
5. `upper()` - Upper case.
6. `name()` - Name case. (ex: Thomas Lewis)
7. `chars_count()` - Count of few chars.
8. `last_position_for_one_of_chars()` - Finds last position for one of chars.
- `set_encoding($enc)` - Sets encoding for using in all functions.
- `length($string)` - Calculates count of characters in string.
- `slice($string, $start, $end = null)` - Slices string like "[:]" in python.
- `lower($string)` - Lower case.
- `upper($string)` - Upper case.
- `name($string)` - Name case. (ex: Thomas Lewis)
- `chars_count($string, array $chars)` - Count of few chars.
- `last_position_for_one_of_chars($string, array $chars)` - Finds last position for one of chars.

0 comments on commit 8280ed2

Please sign in to comment.