private function buildFacetsArray($facetsJson) {
        foreach($facetsJson as $facetObj) {
            //build array of term with <term> => <number of occurences>
            $terms = array();
            foreach($facetObj->terms as $termObj) {
                $terms[$termObj->term] = $termObj->count;
            }
            $this->facets[$facetObj->fieldName] = $terms;
        }
    }
private function buildFacetsArray($facetsJson) {
        foreach($facetsJson as $facetObj) {
            //build array of term with <term> => <number of occurences>
            $terms = array();
            foreach($facetObj->terms as $termObj) {
                $terms[$termObj->term] = $termObj->count;
            }
            $this->facets[$facetObj->fieldName] = $terms;
        }
    }
private function buildFacetsArray ( $ facetsJson ) { foreach ( $ facetsJson as $ facetObj ) { //build array of term with <term> => <number of occurences> $ terms = array ( ) ; foreach ( $ facetObj -> terms as $ termObj ) { $ terms [ $ termObj -> term ] = $ termObj -> count ; } $ this -> facets [ $ facetObj -> fieldName ] = $ terms ; } }
Build array of facets based on JSON results
@param array $facetsJson Array of JSON values for facets
Build array of facets based on JSON results