protected function _getUniqueWord(array $definitions, array $existingWords)
    {
        $definition = $this->_randomizer ? $this->_randomizer->getArrayValue($definitions) : $definitions[array_rand($definitions)];

        if (array_search($definition['word'], $existingWords) === false) {
            return $definition;
        }

        return $this->_getUniqueWord($definitions, $existingWords);
    }
protected function _getUniqueWord(array $definitions, array $existingWords)
    {
        $definition = $this->_randomizer ? $this->_randomizer->getArrayValue($definitions) : $definitions[array_rand($definitions)];

        if (array_search($definition['word'], $existingWords) === false) {
            return $definition;
        }

        return $this->_getUniqueWord($definitions, $existingWords);
    }
protected function _getUniqueWord ( array $ definitions , array $ existingWords ) { $ definition = $ this -> _randomizer ? $ this -> _randomizer -> getArrayValue ( $ definitions ) : $ definitions [ array_rand ( $ definitions ) ] ; if ( array_search ( $ definition [ 'word' ] , $ existingWords ) === false ) { return $ definition ; } return $ this -> _getUniqueWord ( $ definitions , $ existingWords ) ; }
Get a definition from the definitions that does not exist already.

@param array $definitions The word list to pick from.
@param array $existingWords The already-chosen words to avoid.
@return array The definition of a previously unchosen word.
Get a definition from the definitions that does not exist already .