src/snac/client/webui/WebUIExecutor.php
/**
     * Add Maybe-same Assertion
     *
     * Add a maybe-same assertion between the Constellations given by the parameters.
     *
     * @param string[] $input Post/Get inputs from the webui
     * @return string[] The web ui's response to the client (array ready for json_encode)
     */
Add Maybe-same Assertion
Add a maybe-same assertion between the Constellations given by the parameters.

@param string[] $input Post/Get inputs from the webui
@return string[] The web ui's response to the client (array ready for json_encode)
Add Maybe - same Assertion Add a maybe - same assertion between the Constellations given by the parameters . @param string [] $input Post / Get inputs from the webui @return string [] The web ui ' s response to the client ( array ready for json_encode )
public function addMaybeSameAssertion(&$input) {
        if (isset($input["maybesamecount"]) && is_numeric($input["maybesamecount"]) && $input["maybesamecount"] > 1) {
            $count = $input["maybesamecount"];
            $icids = array();
            for ($i = 1; $i <= $count; $i++) {
                if (!isset($input["constellationid" .$i])) {
                    $this->logger->addDebug("Error page being drawn");
                    $this->drawErrorPage(["error" => "Could not Make Assertion"], $display);
                }
                array_push($icids, $input["constellationid" . $i]);
            }
            $query = [
                "constellationids" => $icids
            ];
            $query["command"] = "constellation_add_maybesame";
            if (isset($input["statement"])) {
                $query["assertion"] = $input["statement"];
            }
            $this->logger->addDebug("Asking server to make the maybe-same assertion");
            $serverResponse = $this->connect->query($query);
            $this->logger->addDebug("Received server response", array($serverResponse));
            return $serverResponse;
        }
        return "An error occurred";
    }
public function addMaybeSameAssertion ( & $ input ) { if ( isset ( $ input [ " maybesamecount " ] ) && is_numeric ( $ input [ " maybesamecount " ] ) && $ input [ " maybesamecount " ] > 1 ) { $ count = $ input [ " maybesamecount " ] ; $ icids = array ( ) ; for ( $ i = 1 ; $ i <= $ count ; $ i ++ ) { if ( ! isset ( $ input [ " constellationid " . $ i ] ) ) { $ this -> logger -> addDebug ( " Error page being drawn " ) ; $ this -> drawErrorPage ( [ " error " => " Could not Make Assertion " ] , $ display ) ; } array_push ( $ icids , $ input [ " constellationid " . $ i ] ) ; } $ query = [ " constellationids " => $ icids ] ; $ query [ " command " ] = " constellation_add_maybesame " ; if ( isset ( $ input [ " statement " ] ) ) { $ query [ " assertion " ] = $ input [ " statement " ] ; } $ this -> logger -> addDebug ( " Asking server to make the maybe-same assertion " ) ; $ serverResponse = $ this -> connect -> query ( $ query ) ; $ this -> logger -> addDebug ( " Received server response " , array ( $ serverResponse ) ) ; return $ serverResponse ; } return " An error occurred " ; }
Add Maybe-same Assertion
 Add a maybe-same assertion between the Constellations given by the parameters.
Add Maybe - same Assertion Add a maybe - same assertion between the Constellations given by the parameters .
// Ask the server to do the merge