Exemplo n.º 1
0
 /**
  * Serve nginx site configuration file as html
  *
  * @param string $filename Name of the nginx site file (without path).
  * @return void
  */
 public function file($filename)
 {
     $content = CakeboxUtility::getFileContent("/etc/nginx/sites-available/{$filename}");
     if (!$content) {
         throw new NotFoundException();
     }
     $this->set(['content' => $content, '_serialize' => ['content']]);
 }
Exemplo n.º 2
0
 /**
  * Return LICENSE.TXT as json
  *
  * @return void
  */
 public function license()
 {
     $this->set(['fileContent' => CakeboxUtility::getFileContent('/cakebox/console/LICENSE.txt'), '_serialize' => ['fileContent']]);
 }