public function createRFRRequest($hash_in) { if ($this->num_batch_requests > 0) { throw new \RuntimeException("Could not add the RFR Request. A single Litle Request cannot have both an RFR request and batch requests together."); } if ($this->closed) { throw new \RuntimeException("Could not add the RFR Request. This litleRequest is closed."); } $RFRXml = Obj2xml::rfrRequestToXml($hash_in); file_put_contents($this->request_file, Obj2xml::generateRequestHeader($this->config, $this->num_batch_requests), FILE_APPEND); file_put_contents($this->request_file, $RFRXml, FILE_APPEND); file_put_contents($this->request_file, "</litleRequest>", FILE_APPEND); unlink($this->batches_file); unset($this->batches_file); $this->closed = true; }