Source of file GuruBuildTask.php
Size: 1,439 Bytes - Last Modified: 2021-12-24T06:49:04+00:00
/var/www/docs.ssmods.com/process/src/code/Tasks/GuruBuildTask.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 | <?php abstract class GuruBuildTask extends BuildTask { protected $renderer; protected $isCLI; protected $eol; protected $indent; public function __construct() { parent::__construct(); $this->isCLI = Director::is_cli(); $this->eol = $this->isCLI ? PHP_EOL : "<br/>"; $this->indent = $this->isCLI ? " " : " "; $this->renderer = DebugView::create(); } public function renderHeader() { if (!$this->isCLI) { ini_set('max_execution_time', 1800); //1800 seconds = 30 minutes ini_set('memory_limit', '1204M'); $this->renderer = DebugView::create(); $this->renderer->writeHeader(); $this->renderer->writeInfo($this->title, Director::absoluteBaseURL()); echo "<div class=\"build\">"; } } public function renderFooter() { if (!$this->isCLI) { echo "</div>"; $this->renderer->writeFooter(); } } // public function run($request) // { // $result = true; // if (!Director::isDev() && !$this->isCLI && !Permission::check("ADMIN")) { // $result = Security::permissionFailure(); // } else { // $this->renderHeader(); // //Run task code... // $this->renderFooter(); // } // return $result; // } } |