src/snac/client/webui/WebUIExecutor.php
/**
     * Add Not-same Assertion
     *
     * Add a not-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 Not-same Assertion
Add a not-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 Not - same Assertion Add a not - 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 processNotSameAssertion(&$input) {
        if (isset($input["assertcount"]) && is_numeric($input["assertcount"]) && $input["assertcount"] > 1) {
            $count = $input["assertcount"];
            $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
            ];
            if (isset($input["assert"]) && $input["assert"] == "true") {
                $query["command"] = "constellation_assert";
                $query["type"] = "not_same";
                if (!isset($input["statement"]) || $input["statement"] == "") {
                   return array("response" => "failure", "error" => "Need statement with assertion");
                }
                $query["assertion"] = $input["statement"];
            } else {
                $query["command"] = "constellation_remove_maybesame";
            }
            $this->logger->addDebug("Asking server to make the assertion");
            $serverResponse = $this->connect->query($query);
            $this->logger->addDebug("Received server response", array($serverResponse));
            return $serverResponse;
        }
    }
public function processNotSameAssertion ( & $ input ) { if ( isset ( $ input [ " assertcount " ] ) && is_numeric ( $ input [ " assertcount " ] ) && $ input [ " assertcount " ] > 1 ) { $ count = $ input [ " assertcount " ] ; $ 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 ] ; if ( isset ( $ input [ " assert " ] ) && $ input [ " assert " ] == " true " ) { $ query [ " command " ] = " constellation_assert " ; $ query [ " type " ] = " not_same " ; if ( ! isset ( $ input [ " statement " ] ) || $ input [ " statement " ] == " " ) { return array ( " response " => " failure " , " error " => " Need statement with assertion " ) ; } $ query [ " assertion " ] = $ input [ " statement " ] ; } else { $ query [ " command " ] = " constellation_remove_maybesame " ; } $ this -> logger -> addDebug ( " Asking server to make the assertion " ) ; $ serverResponse = $ this -> connect -> query ( $ query ) ; $ this -> logger -> addDebug ( " Received server response " , array ( $ serverResponse ) ) ; return $ serverResponse ; } }
Add Not-same Assertion
 Add a not-same assertion between the Constellations given by the parameters.
Add Not - same Assertion Add a not - same assertion between the Constellations given by the parameters .
// Ask the server to do the merge