Skip to content

BlorisL/php-tsuruya

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-tsuruya

Description

Words filter and bad words substitutions.

Table of Contents

Installation

Just PHP and iconv.

Usage

A Tsuruya\Letter will be represented like this:

Property Type Description
char string
translit string
locale string
bytes int
bytesTranslit int
index int
pos int
posTranslit int

A Tsuruya\Phrase object will be represented like this:

Property Type Description
locale string
phrase string
phraseT string
phraseF string
letters array
words array
replaces \stdClass

Examples

$example = 'Ho can3 ûn g#4*Tt(_______) IN Cå$...aα Chë lîTiga sémpr€ CØL MIÕ Ç/-\n......€! AΑα';
$obj = new \Tsuruya\Phrase($example, 'it_IT');
echo $obj->getPhrase(); // Ho un can3 e ûn g#4*Tt(_______) IN Cå$...aα Chë lîTigano sémpr€ CØL MIÕ Ç/-\n......€! AΑα
ehco $obj->filter(); // Ho un ### e ûn ### IN ###α Chë lîTigano sémpr€ CØL MIÕ ###! AΑα

License

Code licensed under the MIT License.

Do whatever you want with this code, but remember opensource projects work with the help of the community so would be really useful if any errors, updates, features or ideas were reported.

Share with me a cup of tea

About

Words filter and bad words substitutions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages