Skip to content

amneale/dictionary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

amneale/dictionary

Build Status Code Quality

Install

Via Composer

$ composer require amneale/dictionary

Usage

Creating a dictionary from strings, and reading the content a random, shuffled order:

$reader = new ShuffleReader();
$dictionary = new Dictionary('foo', 'bar', 'baz');

for ($i = 0; $i < count($dictionary); ++$i) {
    echo $reader->read($dictionary) . "\n";
}

Loading a dictionary from a file:

$dictionary = Dictionary\Loader\SimpleFileLoader::fromFile('/foo/bar/baz.txt');

Loading a dictionary from a CSV file:

$dictionary = Dictionary\Loader\SimpleFileLoader::fromFile('/foo/bar/baz.csv', ',');

Testing

To run automatic code-style fixer

$ make fmt

To run all tests

$ make test

About

PHP library for loading and reading collections of strings

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors