public function getInputsFromSearchResult($searchResult)
    {
        $input_array = [];

        if (!isset($searchResult['hits'])) {
            throw new \Exception('Hits Not Found');
        }

        foreach ($searchResult['hits'] as $hit) {
            if (!isset($hit['input'])) {
                throw new \Exception('Inputs Not Found');
            }
            $input = new Input($hit['input']);
            $input_array[] = $input;
        }

        return $input_array;
    }
public function getInputsFromSearchResult($searchResult)
    {
        $input_array = [];

        if (!isset($searchResult['hits'])) {
            throw new \Exception('Hits Not Found');
        }

        foreach ($searchResult['hits'] as $hit) {
            if (!isset($hit['input'])) {
                throw new \Exception('Inputs Not Found');
            }
            $input = new Input($hit['input']);
            $input_array[] = $input;
        }

        return $input_array;
    }
public function getInputsFromSearchResult ( $ searchResult ) { $ input_array = [ ] ; if ( ! isset ( $ searchResult [ 'hits' ] ) ) { throw new \ Exception ( 'Hits Not Found' ) ; } foreach ( $ searchResult [ 'hits' ] as $ hit ) { if ( ! isset ( $ hit [ 'input' ] ) ) { throw new \ Exception ( 'Inputs Not Found' ) ; } $ input = new Input ( $ hit [ 'input' ] ) ; $ input_array [ ] = $ input ; } return $ input_array ; }
Parses Search Request Result and gets Inputs

@param $searchResult

@return array

@throws \Exception
Parses Search Request Result and gets Inputs