src/snac/server/ServerExecutor.php
/**
     * VAlidate EAD and return result
     *
     * Calls EAD Parser on zip file given on the input and returns
     * any errors that occurred during the validation process.
     *
     * @param string[] $input Input array from the Server object
     * @return string[] The response to send to the client
     */
VAlidate EAD and return result
Calls EAD Parser on zip file given on the input and returns
any errors that occurred during the validation process.

@param string[] $input Input array from the Server object
@return string[] The response to send to the client
VAlidate EAD and return result Calls EAD Parser on zip file given on the input and returns any errors that occurred during the validation process . @param string [] $input Input array from the Server object @return string [] The response to send to the client
public function validateEAD($input) {
        if (!isset($input["file"]) || !isset($input["file"]["mime-type"]) || !isset($input["file"]["content"])) {
            throw new \snac\exceptions\SNACInputException("No zip file or url specified", 400);
        }
        $response = array();
        $parser = new \snac\util\EADParser();
        $file = base64_decode($input["file"]["content"]);
        $errors = $parser->validateZip($file);
        if (empty($errors))
            $response["result"] = "success";
        else
            $response = [
                "result" => "failure",
                "errors" => $errors
            ];
        return $response;
    }
public function validateEAD ( $ input ) { if ( ! isset ( $ input [ " file " ] ) || ! isset ( $ input [ " file " ] [ " mime-type " ] ) || ! isset ( $ input [ " file " ] [ " content " ] ) ) { throw new \ snac \ exceptions \ SNACInputException ( " No zip file or url specified " , 400 ) ; } $ response = array ( ) ; $ parser = new \ snac \ util \ EADParser ( ) ; $ file = base64_decode ( $ input [ " file " ] [ " content " ] ) ; $ errors = $ parser -> validateZip ( $ file ) ; if ( empty ( $ errors ) ) $ response [ " result " ] = " success " ; else $ response = [ " result " => " failure " , " errors " => $ errors ] ; return $ response ; }
VAlidate EAD and return result
 Calls EAD Parser on zip file given on the input and returns
 any errors that occurred during the validation process.
VAlidate EAD and return result Calls EAD Parser on zip file given on the input and returns any errors that occurred during the validation process .