private function getBy($search, $column)
    {
        $search = mb_strtolower($search, mb_detect_encoding($search));
        $this->procBuilder->setArguments(['-e', "\t$search\t"]);
        $process = $this->procBuilder->getProcess();
        $process->run();
        $csv = Csv\Reader::createFromString($process->getOutput());
        $csv->setDelimiter($this->delimiter);
        $results = [];
        foreach ($csv->fetchAssoc(['id', 'inflection', 'lemma', 'tags']) as $row) {
            if ($row[$column] == $search) {
                $results[] = new Inflection($row['id'], $row['inflection'], $row['lemma'], explode(' ', $row['tags']));
            }
        }

        return $results;
    }
private function getBy($search, $column)
    {
        $search = mb_strtolower($search, mb_detect_encoding($search));
        $this->procBuilder->setArguments(['-e', "\t$search\t"]);
        $process = $this->procBuilder->getProcess();
        $process->run();
        $csv = Csv\Reader::createFromString($process->getOutput());
        $csv->setDelimiter($this->delimiter);
        $results = [];
        foreach ($csv->fetchAssoc(['id', 'inflection', 'lemma', 'tags']) as $row) {
            if ($row[$column] == $search) {
                $results[] = new Inflection($row['id'], $row['inflection'], $row['lemma'], explode(' ', $row['tags']));
            }
        }

        return $results;
    }
private function getBy ( $ search , $ column ) { $ search = mb_strtolower ( $ search , mb_detect_encoding ( $ search ) ) ; $ this -> procBuilder -> setArguments ( [ '-e' , "\t$search\t" ] ) ; $ process = $ this -> procBuilder -> getProcess ( ) ; $ process -> run ( ) ; $ csv = Csv \ Reader :: createFromString ( $ process -> getOutput ( ) ) ; $ csv -> setDelimiter ( $ this -> delimiter ) ; $ results = [ ] ; foreach ( $ csv -> fetchAssoc ( [ 'id' , 'inflection' , 'lemma' , 'tags' ] ) as $ row ) { if ( $ row [ $ column ] == $ search ) { $ results [ ] = new Inflection ( $ row [ 'id' ] , $ row [ 'inflection' ] , $ row [ 'lemma' ] , explode ( ' ' , $ row [ 'tags' ] ) ) ; } } return $ results ; }
Get inflections by searching in a specific column.

@param string $search String to search
@param string $column Column name

@return Inflection[] Search results
Get inflections by searching in a specific column .