protected function setResult($hydratorset = null, $callback = null) {

        $res = $this->builder->getQuery()->execute();
        $call = "Searcher\\Searcher\\Hydrators\\" . ucfirst($hydratorset) . "Hydrator";

        if ($res->valid() === true) {

            if(class_exists($call) === true) {

                $res = (new $call($res))->extract($callback);

            }
            return $res;
        }
        return null;

    }
protected function setResult($hydratorset = null, $callback = null) {

        $res = $this->builder->getQuery()->execute();
        $call = "Searcher\\Searcher\\Hydrators\\" . ucfirst($hydratorset) . "Hydrator";

        if ($res->valid() === true) {

            if(class_exists($call) === true) {

                $res = (new $call($res))->extract($callback);

            }
            return $res;
        }
        return null;

    }
protected function setResult ( $ hydratorset = null , $ callback = null ) { $ res = $ this -> builder -> getQuery ( ) -> execute ( ) ; $ call = "Searcher\\Searcher\\Hydrators\\" . ucfirst ( $ hydratorset ) . "Hydrator" ; if ( $ res -> valid ( ) === true ) { if ( class_exists ( $ call ) === true ) { $ res = ( new $ call ( $ res ) ) -> extract ( $ callback ) ; } return $ res ; } return null ; }
Setup output result

@param null $hydratorset
@param null $callback
@return Builder|null
Setup output result