Example #1
-1
 /**
  *
  */
 public function RepublishFile()
 {
     //TODO Replace hardcoded string for root with dynamic stuff instead!
     $applicationRoot = $_SERVER['DOCUMENT_ROOT'] . '/1dv608/iwish/';
     $pathToArchive = $_SERVER['DOCUMENT_ROOT'] . '/1dv608/iwish/data/physicalRepoArchive/';
     $pathToFile = $pathToArchive . $this->webhook->getCommits()->getId() . '/' . $this->currentCollection . '/' . $this->file;
     $raw = file_get_contents($pathToFile);
     $datetoday = date("Ymd");
     $raw .= "\n//Republished by Iwish {$datetoday}";
     file_put_contents($applicationRoot . $this->file, $raw);
 }
Example #2
-1
 /**
  * @return string
  * @throws \Exception
  */
 public function GetContentInFile()
 {
     //TODO Replace hardcoded string for root with dynamic stuff instead!
     $pathToArchive = $_SERVER['DOCUMENT_ROOT'] . '/1dv608/iwish/data/physicalRepoArchive/';
     $pathToFile = $pathToArchive . $this->webhook->getCommits()->getId() . '/' . $this->currentCollection . '/' . $this->file;
     //TODO Urrrggggh fix this later ;)
     $content = @file_get_contents($pathToFile);
     if ($content == "" || $content == null) {
         throw new \Exception('', 100);
     }
     return $content;
 }