/** * Construct a visit class object to serialize candidate visits * * @param string $method The method of the HTTP request * @param string $CandID The CandID to be serialized * @param string $VisitLabel The visit label to be serialized * @param string $Filename The file name to be retrieved */ public function __construct($method, $CandID, $VisitLabel, $Filename) { ob_start(); $requestDelegationCascade = $this->AutoHandleRequestDelegation; $this->AutoHandleRequestDelegation = false; if (empty($this->AllowedMethods)) { $this->AllowedMethods = ['GET', 'PUT']; } $this->CandID = $CandID; $this->VisitLabel = $VisitLabel; $this->Filename = $Filename; // $this->Timepoint = \Timepoint::singleton($timepointID); // Parent constructor will handle validation of // CandID parent::__construct($method, $CandID, $VisitLabel); $results = $this->getDatabaseDir(); if (empty($results)) { $this->header("HTTP/1.1 404 Not Found"); $this->error("File not found"); $this->safeExit(0); } if ($requestDelegationCascade) { $this->handleRequest(); } }
/** * Construct a visit class object to serialize candidate visits * * @param string $method The method of the HTTP request * @param string $CandID The CandID to be serialized * @param string $VisitLabel The visit label to be serialized */ public function __construct($method, $CandID, $VisitLabel) { $requestDelegationCascade = $this->AutoHandleRequestDelegation; $this->AutoHandleRequestDelegation = false; if (empty($this->AllowedMethods)) { $this->AllowedMethods = ['GET', 'PUT']; } $this->CandID = $CandID; $this->VisitLabel = $VisitLabel; // Parent constructor will handle validation of // CandID and VisitLabel parent::__construct($method, $CandID, $VisitLabel); if ($requestDelegationCascade) { $this->handleRequest(); } }