PHPackages                             gavinggordon/wordstore - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. gavinggordon/wordstore

ActiveLibrary[File &amp; Storage](/categories/file-storage)

gavinggordon/wordstore
======================

This is a CRUD compliant, language data storage class.

2.0.6(9y ago)1262MITPHP

Since Apr 14Pushed 9y ago2 watchersCompare

[ Source](https://github.com/gavinggordon/wordstore)[ Packagist](https://packagist.org/packages/gavinggordon/wordstore)[ Docs](http://wordstore.gavingordon.com)[ RSS](/packages/gavinggordon-wordstore/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

WordStore v2.0.6
================

[](#wordstore-v206)

[![Build Status](https://camo.githubusercontent.com/673cff372e26235972d60f134b14a6bcc6c4065882adf58f21876edad75a0b43/68747470733a2f2f7472617669732d63692e6f72672f676176696e67676f72646f6e2f776f726473746f72652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/gavinggordon/wordstore)

Synopsis
--------

[](#synopsis)

This PHP class ( GGG\\WordStore ) is a CRUD compliant language data storage class. It provides the ability to create a language dictionary. All enteries you create are stored in the WordStore and can contain user-definited parameters, all of which can be: searched and retrieved; updated; and, deleted.

How to use 'WordStore'
----------------------

[](#how-to-use-wordstore)

### Install via Composer...

[](#install-via-composer)

```
	composer require gavinggordon/wordstore

```

### Include autoload.php...

[](#include-autoloadphp)

```
	include_once( __DIR__ . '/vendor/autoload.php' );

```

### Create new instance...

[](#create-new-instance)

```
	//
	// new WordStore(
	//
	// @param string $dictionary_file *optional*
	// default value = 'dictionary.json'
	//
	// );
	//
	// @return object
	//

	$json_dictionary_file = __DIR__ . '/myDictionary.json';
	// optionally, override the default name to be used for the .json
	// dictionary file, where all the related word data will be stored

	$wordstore = new GGG\WordStore( $json_dictionary_file );
	// creates the dictionary storage file, if it doesn't already exist

```

#### Adding a word...

[](#adding-a-word)

```
	//
	// WordStore->add(
	//
	//	@param string $part_of_speech *required*
	// possible values =
	// 'adjective' || 'adverb' || 'article' || 'interjection' ||
	// 'noun' || 'pronoun' || 'personalpronoun' ||
	// 'preposition' || 'punctuation' || 'verb'
	//
	//	@param string $word *required*
	//	possible values = *
	//
	//	@param array $params *required*
	//	possible values = *
	//
	// );
	//
	// @return object | FALSE
	//

	$wordstore->add( 'noun', 'vuča', [
		'translation' => 'friend',
		'pronounciation' => 'voo-cha'
	] );

```

#### Finding a word...

[](#finding-a-word)

```
	//
	// WordStore->find(
	//
	//	@param string $value *required*
	//	possible values = *
	//
	//	@param string $part_of_speech *optional*
	// default value = NULL
	// possible values =
	// 'adjective' || 'adverb' || 'article' || 'interjection' ||
	// 'noun' || 'pronoun' || 'personalpronoun' ||
	// 'preposition' || 'punctuation' || 'verb'
	//
	//	@param string $param *optional*
	// default value = NULL
	//	possible values = *
	//
	// );
	//
	// @return array | FALSE;
	//

	$word = $wordstore->find( 'vuča' );
	print_r( $word );

	//
	// Array
	// (
	// 		[translation] => friend
	//		[pronounciation] => voo-cha
	// );
	//

```

#### Updating a word...

[](#updating-a-word)

```
	//
	// WordStore->update(
	//
	//	@param string $newvalue *required*
	//	possible values = *
	//
	//	@param string $oldvalue *required*
	//	possible values = *
	//
	//	@param string $part_of_speech *optional*
	// default value = NULL
	// possible values =
	// 'adjective' || 'adverb' || 'article' || 'interjection' ||
	// 'noun' || 'pronoun' || 'personalpronoun' ||
	// 'preposition' || 'punctuation' || 'verb'
	//
	//	@param string $param *optional*
	// default value = NULL
	//	possible values = *
	//
	// );
	//
	// @return object | FALSE
	//

	$wordstore->update( 'partner', 'vuča', 'noun', 'translation' );
	$word = $wordstore->find( 'buddy' );

	//
	// Array
	// (
	//	  [0] => stdClass Object
	//	       (
	//              [translation] => partner
	//              [pronounciation] => voo-cha
	//        )
	// );
	//

```

#### Deleting a word...

[](#deleting-a-word)

```
	//
	// WordStore->delete(
	//
	//	@param string $newvalue *required*
	//	possible values = *
	//
	//	@param string $part_of_speech *optional*
	// default value = NULL
	// possible values =
	// 'adjective' || 'adverb' || 'article' || 'interjection' ||
	// 'noun' || 'pronoun' || 'personalpronoun' ||
	// 'preposition' || 'punctuation' || 'verb'
	//
	// );
	//
	// @return object | FALSE
	//

	$wordstore->delete( 'vuča', 'noun' );
	$word = $wordstore->find( 'vuča' );

	//
	// FALSE
	//

```

---

#### More Information

[](#more-information)

##### PHP Innovation Award

[](#php-innovation-award)

This [class](http://www.phpclasses.org/package/9724.html) has been nominated for a PHP Innovation Award, provided by [PHPClasses.org](http://www.phpclasses.org). If you found [this class](http://www.phpclasses.org/package/9724.html) to be at all interesting, helpful, particularly useful, or innovative in any way, please [vote](http://www.phpclasses.org/vote.html) for it, to show your support for [this](http://www.phpclasses.org/package/9724.html) or any other PHP classes accessible online via my [GitHub profile](https://github.com/gavinggordon) or [PHPClasses.org profile](http://www.phpclasses.org/browse/author/1348645.html).

---

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Total

5

Last Release

3606d ago

Major Versions

1.1.1 → 2.0.62016-08-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7691513?v=4)[Gavin G Gordon](/maintainers/gavinggordon)[@gavinggordon](https://github.com/gavinggordon)

---

Top Contributors

[![gavinggordon](https://avatars.githubusercontent.com/u/7691513?v=4)](https://github.com/gavinggordon "gavinggordon (22 commits)")

---

Tags

phpjsonlanguagewordsstoragecruddictionarycustomwordstoreconlangcustom dictionarylanguage makerlanguage creatordictionary buildercreate read update deletev2.0.6

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gavinggordon-wordstore/health.svg)

```
[![Health](https://phpackages.com/badges/gavinggordon-wordstore/health.svg)](https://phpackages.com/packages/gavinggordon-wordstore)
```

###  Alternatives

[google/cloud

Google Cloud Client Library

1.2k16.5M57](/packages/google-cloud)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
