Controller class

package Webenq
author Bart Huttinga <b.huttinga@nivocer.com>, Jaap-Andre de Hoop <j.dehoop@nivocer.com>

 Methods

clientAction()

clientAction() 

mergeAction()

mergeAction() 

Check if the text is in haystack, first try an exact match, if not success try levenshtein difference

_checkSimilarText(string $text, array $haystack) : array

Parameters

$text

string

text to search in $haystack

$haystack

array

array to search for $text

Returns

arraywith $haystackText=>distance

Merges data array if the question texts are the same

_mergeData(array $data, array $newData, $setId) : array

Both input arrays are 'spreadsheet2array' only the first sheet is merged

Parameters

$data

array

&$data

$newData

array

&$newData

$setId

Returns

array