src/snac/server/ServerExecutor.php
/**
     * Browse Constellations
     *
     * Reads the user input and performs the browse operation, returning
     * the list of constellations surrounding the given query (in alphabetical
     * order by preferred name entry).
     *
     * @param string[] $input Input array from the Server object
     * @return string[] The response to send to the client
     */
Browse Constellations
Reads the user input and performs the browse operation, returning
the list of constellations surrounding the given query (in alphabetical
order by preferred name entry).

@param string[] $input Input array from the Server object
@return string[] The response to send to the client
Browse Constellations Reads the user input and performs the browse operation returning the list of constellations surrounding the given query ( in alphabetical order by preferred name entry ) . @param string [] $input Input array from the Server object @return string [] The response to send to the client
public function browseConstellations(&$input) {
        $response = array();
        $term = "";
        $position = "after";
        if (isset($input["term"]) && $input["term"] != "") {
            $term = $input["term"];
            if (isset($input["position"]) && ($input["position"] == "middle" || $input["position"] == "before"))
                $position = $input["position"];
        }
        $entityType = null;
        if (isset($input["entity_type"]))
            $entityType = $input["entity_type"];
        $icid = 0;
        if (isset($input["icid"]))
            $icid = $input["icid"];
        $results = $this->cStore->browseNameIndex($term, $position, $entityType, $icid);
        foreach ($results as $k => $result) {
            $constellation = new \snac\data\Constellation();
            $constellation->setID($result["ic_id"]);
            if (\snac\Config::$USE_NEO4J) {
                $this->neo4J->checkHoldingInstitutionStatus($constellation);
            }
            if ($constellation->hasFlag("holdingRepository"))
                $results[$k]["entity_type"] = "holdingRepository";
        }
        $response["results"] = $results;
        $response["result"] = "success";
        return $response;
    }
public function browseConstellations ( & $ input ) { $ response = array ( ) ; $ term = " " ; $ position = " after " ; if ( isset ( $ input [ " term " ] ) && $ input [ " term " ] != " " ) { $ term = $ input [ " term " ] ; if ( isset ( $ input [ " position " ] ) && ( $ input [ " position " ] == " middle " || $ input [ " position " ] == " before " ) ) $ position = $ input [ " position " ] ; } $ entityType = null ; if ( isset ( $ input [ " entity_type " ] ) ) $ entityType = $ input [ " entity_type " ] ; $ icid = 0 ; if ( isset ( $ input [ " icid " ] ) ) $ icid = $ input [ " icid " ] ; $ results = $ this -> cStore -> browseNameIndex ( $ term , $ position , $ entityType , $ icid ) ; foreach ( $ results as $ k => $ result ) { $ constellation = new \ snac \ data \ Constellation ( ) ; $ constellation -> setID ( $ result [ " ic_id " ] ) ; if ( \ snac \ Config :: $ USE_NEO4J ) { $ this -> neo4J -> checkHoldingInstitutionStatus ( $ constellation ) ; } if ( $ constellation -> hasFlag ( " holdingRepository " ) ) $ results [ $ k ] [ " entity_type " ] = " holdingRepository " ; } $ response [ " results " ] = $ results ; $ response [ " result " ] = " success " ; return $ response ; }
Browse Constellations
 Reads the user input and performs the browse operation, returning
 the list of constellations surrounding the given query (in alphabetical
 order by preferred name entry).
Browse Constellations Reads the user input and performs the browse operation returning the list of constellations surrounding the given query ( in alphabetical order by preferred name entry ) .
// only update the position if the term is not null