2017 © Pedro Peláez
 

library autocomplete

image

phaniso/autocomplete

  • Wednesday, March 2, 2016
  • by phaniso
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

php-autocomplete

Scrutinizer Code Quality Coverage Status Build Status, (*1)

Autocomplete PHP library that utilize trie data structure., (*2)

Installation

composer require phaniso/autocomplete

How to use

  1. Build container
use Autocomplete\Factory\ContainerFactory;

$containerFactory = new ContainerFactory;
$trie = $containerFactory->build('Trie');

By default trie is case sensitive if you want to change it pass false as an argument, (*3)

$trie = $containerFactory->build('Trie', [false]);

2.Add word, (*4)

$trie->addWord('randomWord');

3.Get word(s) using prefix, (*5)

$words = $trie->getByPrefix('random');

$words variable will now contain one element with 'randomWord' value, (*6)

The Versions

02/03 2016

dev-master

9999999-dev

  Sources   Download

GPL-2.0

The Requires

  • php >= 5.5.0

 

by Avatar phaniso

autocomplete trie prefix tree

29/02 2016

v1.0

1.0.0.0

  Sources   Download

GPL-2.0

The Requires

  • php >= 5.5.0

 

by Avatar phaniso

autocomplete trie prefix tree