Presents a compiled static HTML file when present.

@since 1.0.0

@return void
185955
public function load()
    {
        // We only care about GET requests at the moment
        if ($_SERVER['REQUEST_METHOD'] !== 'GET') {
            return;
        }

        $file = $_SERVER['REQUEST_URI'] . 'index.html';
        if (is_file($this->destination . $file)) {
            $contents = file_get_contents($this->destination . $file);
            do_action('staticwp_pre_cache_hit', $_SERVER['REQUEST_URI']);
            echo apply_filters('staticwp_cache_hit_contents', $contents);
            do_action('staticwp_post_cache_hit', $_SERVER['REQUEST_URI']);
            exit();
        } else {
            do_action('staticwp_cache_miss', $_SERVER['REQUEST_URI']);
        }
    }
592552
protected function compileClasses()
	{
		$this->registerClassPreloaderCommand();

		$this->callSilent('compile', array(
			'--config' => implode(',', $this->getClassFiles()),
			'--output' => $this->laravel->getCachedCompilePath(),
			'--strip_comments' => 1,
		));
	}
635394
public static function render()
    {
        $trace = static::$chronology;

        ob_start();
        include __DIR__ . '/Views/Debugger.php';
        $output = ob_get_contents();
        ob_end_clean();

        static::$chronology = [];

        echo $output;
    }
410551
protected function compile()
  {

    global $objPage;


		if (FE_USER_LOGGED_IN)
    {
      $this->import('FrontendUser', 'User');
    }

    switch ($this->strType)
    {
      case "track":
        $objData = $this->Database->prepare("SELECT * FROM tl_c4g_tracking_tracks WHERE id=? AND member=?")
                               ->execute($this->intTrackId, $this->User->id);
        break;
      case "poi":
        $objData = $this->Database->prepare("SELECT * FROM tl_c4g_tracking_pois WHERE id=? AND member=?")
                               ->execute($this->intPoiId, $this->User->id);
        break;
    }

		if ($objData->numRows == 0)
		{
			// Do not index or cache the page
			$objPage->noSearch = 1;
			$objPage->cache = 0;

			// Send a 404 header
			header('HTTP/1.1 404 Not Found');
			$this->Template->error = '<p class="error">' . sprintf($GLOBALS['TL_LANG']['MSC']['invalidPage'], \Input::get('items')) . '</p>';
			return;
		}


		if (!$this->editWithoutFilter && (FE_USER_LOGGED_IN && $this->User->id!=$objData->member))
		{
			// Do not index or cache the page
			$objPage->noSearch = 1;
			$objPage->cache = 0;

			// Send a 404 header
			header('HTTP/1.1 404 Not Found');
			$this->Template->error = '<p class="error">' . sprintf($GLOBALS['TL_LANG']['MSC']['invalidPage'], \Input::get('items')) . '</p>';
			return;
		}

		$arrFields = $this->getFields($objData);
		$arrFieldsForTemplate = array();

		foreach ($arrFields as $arrField)
    {

      $strClass = $GLOBALS['TL_FFL'][$arrField['inputType']];
      if (!$this->classFileExists($strClass))
      {
          continue;
      }

      $arrField['mandatory'] = $arrField['eval']['mandatory'];
      $arrField['tableless'] = true;

      $objWidget = new $strClass($arrField);

      if ($arrField['eval']['rgxp'])
      {
        $objWidget->rgxp = $arrField['eval']['rgxp'];
      }

      if ($arrField['eval']['maxlength'])
      {
        $objWidget->maxlength = $arrField['eval']['maxlength'];
      }

      if (!$arrField['id'] && $arrField['name'])
      {
        $objWidget->id = $arrField['name'];
      }

      if ($arrField['eval']['toggleFields'])
      {
        $objWidget->class = $objWidget->class ? ($objWidget->class . " toggle") : "toggle";
      }

      if ($arrField['eval']['toggleBy'])
      {
        $strToggleByClass = "toggleBy" . ucfirst($arrField['eval']['toggleBy']);

        $blnIsVisible = false;

        $arrToggleField = $this->arrFields[$arrField['eval']['toggleBy']];

        if ($arrToggleField['inputType'] == "checkbox")
        {
          if (\Input::post($arrToggleField['name']))
          {
            $blnIsVisible = true;

            if (!$arrField['eval']['mandatory'] && $arrField['eval']['toggleMandatory'])
            {
              $objWidget->mandatory = true;
            }
          }
        }

        if (!$blnIsVisible)
        {
          $strToggleByClass .= " toggleInvisible";
        }
        else
        {
          $strToggleByClass .= " toggleVisible";
        }

        $objWidget->class = $objWidget->class ? ($objWidget->class . " " . $strToggleByClass) : $strToggleByClass;
      }

      if ($this->Input->post('FORM_SUBMIT') == 'formTrackEdit')
      {
          $objWidget->validate();
          if ($objWidget->hasErrors())
          {
            $this->doNotSubmit = true;
          }
      }

      if ($arrField['eval']['toggleMandatory'] && !$objWidget->mandatory)
      {
        $objWidget->label = '<span class="invisible">Pflichtfeld</span>' . $arrField['label'] . '<span class="mandatory">*</span>';
      }

      $this->Template->fields .= $objWidget->parse();
      $arrFieldsForTemplate[$arrField['name']] = $objWidget->parse();
    }

    if ($this->Input->post('FORM_SUBMIT') == 'formTrackEdit' && !$this->doNotSubmit)
    {
      // Check whether there is a jumpTo page

      $arrForDatabaseUpdate = array();
      $arrForDatabaseUpdate['name'] = \Input::post('name');
      $arrForDatabaseUpdate['visibility'] = \Input::post('visibility');
      $arrForDatabaseUpdate['comment'] = \Input::post('comment');
      if ($arrForDatabaseUpdate['visibility'] == "membergroups")
      {
        $arrForDatabaseUpdate['groups'] = serialize(\Input::post('visibilityGroups'));
      }
      else
      {
        $arrForDatabaseUpdate['groups'] = null;
      }

      if (\Input::post('deleteEntry') == 'delete')
      {
        $arrForDatabaseUpdate['forDelete'] = true;
      }
      else
      {
        $arrForDatabaseUpdate['forDelete'] = false;
      }

      switch ($this->strType)
      {
        case "track":
          $this->Database->prepare("UPDATE tl_c4g_tracking_tracks %s WHERE id=?")
                     ->set($arrForDatabaseUpdate)
                     ->execute($this->intTrackId);
          break;
        case "poi":
          $this->Database->prepare("UPDATE tl_c4g_tracking_pois %s WHERE id=?")
                     ->set($arrForDatabaseUpdate)
                     ->execute($this->intPoiId);
          break;
      }



    	if (($objJumpTo = $this->objModel->getRelated('jumpTo')) !== null)
    	{
    		$this->jumpToOrReload($objJumpTo->row());
    	}

    	$this->reload();
    }

    $this->Template->fieldData = $arrFieldsForTemplate;
    $this->Template->action = "";
    $this->Template->formId = "formTrackEdit";
    $this->Template->method = "post";
    $this->Template->enctype = "";
    $this->Template->attributes = "";
    //$this->Template->novalidate = "novalidate";
    $this->Template->formSubmit = "formTrackEdit";

    $this->Template->submitTitle = "Speichern";


  }
64627
function compile() {
		
		// if no setContent() then load the from file
		if (!$this->getContent()) {
			
			// if no setTemplate() then use default template file
			if (!$this->getTemplate()) {
				$this->setTemplate($this->config['dir_template'] . '/' . $this->name . $this->config['extension']);
			}
			
			$this->_setContentFromFile();
		}
		
		$this->_compile();
		
		return $this;
	}
1082241
public static function init()
	{
		$baseDir = KINT_DIR . 'view/compiled/';

		if ( !is_readable( $cssFile = $baseDir . Kint::$theme . '.css' ) ) {
			$cssFile = $baseDir . 'original.css';
		}

		return
			'<script class="-kint-js">' . file_get_contents( $baseDir . 'kint.js' ) . '</script>'
			. '<style class="-kint-css">' . file_get_contents( $cssFile ) . "</style>\n";
	}
117306
public function output()
    {
        // If the view file exists
        if ($this->hasFile()) {
            // Extract all view variables
            extract($this->getVars());
            ob_start();
            include($this->getPath() . '/' . $this->getFile(true));
            $html = ob_get_contents();
            ob_end_clean();
            return $html;
        } else {
            die('Fatal Error: ' . $this->getPath() . '/' . $this->getFile(true) . ' does not exist.');
        }
    }
157075
public function content()
    {
        $path = '../App/' . $this->viewsDir . $this->view . '.phtml';
        if (file_exists($path)) {
            require $path;

        } else {
            die('No view file ' . $this->view . ' present in view directory.');
        }
    }
1366340
public function render()
    {
        if ( ! $this->label->hasTextContent()) {
            $this->input->attributes->addAttributeClass('position-static');
        }

        return parent::render();
    }
126869
public function render()
    {
        // A file has already been uploaded
        if ($this->value) {

            // If it's required, show the icon but don't enforce it.  There is already
            // a file uploaded after all
            if ($this->isRequired()) {
                $this->setAttribute('required', null);
            }
        }

        // Continue execution
        return parent::render();
    }
426910
public function render()
    {
        if (!$this->visible || $this->image == '') {
            return;
        }

        parent::render();

        $image_tag = new SwatHtmlTag('img');

        if ($this->value === null) {
            $image_tag->src = $this->image;
        } elseif (is_array($this->value)) {
            $image_tag->src = vsprintf($this->image, $this->value);
        } else {
            $image_tag->src = sprintf($this->image, $this->value);
        }

        $image_tag->height = $this->height;
        $image_tag->width = $this->width;
        $image_tag->title = $this->title;

        $margin_x = 0;
        $margin_y = 0;

        if (
            $this->occupy_width !== null &&
            $this->occupy_width > $this->width
        ) {
            $margin_x = intval($this->occupy_width - $this->width);
        }

        if (
            $this->occupy_height !== null &&
            $this->occupy_height > $this->height
        ) {
            $margin_y = intval($this->occupy_height - $this->height);
        }

        if ($margin_x > 0 || $margin_y > 0) {
            $image_tag->style = sprintf(
                $margin_x % 2 === 0 && $margin_y % 2 === 0
                    ? 'margin: %dpx %dpx'
                    : 'margin: %dpx %dpx %dpx %dpx;',
                floor(((float) $margin_y) / 2),
                ceil(((float) $margin_x) / 2),
                ceil(((float) $margin_y) / 2),
                floor(((float) $margin_x) / 2)
            );
        }

        // alt is a required XHTML attribute. We should always display it even
        // if it is not specified.
        $image_tag->alt = $this->alt === null ? '' : $this->alt;

        $image_tag->class = $this->getCSSClassString();

        $image_tag->display();
    }
288728
public function render()
    {
        try {
            $html = $this->html();

            if ($this->editable === true || Editor::isHistory()) {
                $html = $this->addAttributesToHtml($html);
            }

            return empty($html) ? $html : $this->before.$html.$this->after;
        } catch (\Exception $e) {
            if (App::environment() === 'local') {
                throw $e;
            }
        }
    }
650442
public function init()
    {
        $this->header('Content-Type: text/html'); // default header.

        $this->proc = new \PHPDaemon\Core\ShellCommand();
        $this->proc->readPacketSize = $this->appInstance->readPacketSize;
        $this->proc->onReadData([$this, 'onReadData']);
        $this->proc->onWrite([$this, 'onWrite']);
        $this->proc->binPath = $this->appInstance->binPath;
        $this->proc->chroot = $this->appInstance->chroot;

        if (isset($this->attrs->server['BINPATH'])) {
            if (isset($this->appInstance->binAliases[$this->attrs->server['BINPATH']])) {
                $this->proc->binPath = $this->appInstance->binAliases[$this->attrs->server['BINPATH']];
            } elseif ($this->appInstance->config->allowoverridebinpath->value) {
                $this->proc->binPath = $this->attrs->server['BINPATH'];
            }
        }

        if (isset($this->attrs->server['CHROOT']) && $this->appInstance->config->allowoverridechroot->value) {
            $this->proc->chroot = $this->attrs->server['CHROOT'];
        }

        if (isset($this->attrs->server['SETUSER']) && $this->appInstance->config->allowoverrideuser->value) {
            $this->proc->setUser = $this->attrs->server['SETUSER'];
        }

        if (isset($this->attrs->server['SETGROUP']) && $this->appInstance->config->allowoverridegroup->value) {
            $this->proc->setGroup = $this->attrs->server['SETGROUP'];
        }

        if (isset($this->attrs->server['CWD']) && $this->appInstance->config->allowoverridecwd->value) {
            $this->proc->cwd = $this->attrs->server['CWD'];
        } elseif ($this->appInstance->config->cwd->value !== null) {
            $this->proc->cwd = $this->appInstance->config->cwd->value;
        } else {
            $this->proc->cwd = dirname($this->attrs->server['SCRIPT_FILENAME']);
        }

        $this->proc->setArgs([$this->attrs->server['SCRIPT_FILENAME']]);
        $this->proc->setEnv($this->attrs->server);
        $this->proc->execute();
    }
857114
public function renderJs(): void
	{
		if ($this->mode === self::MODE_DEFAULT) {
			$el = Html::el('script type="text/javascript" async defer');
			$el->src = self::GOOGLE_PLATFORM_URL;
			$el->addText("{lang: '" . $this->lang . "'}");

			echo $el;

		} elseif ($this->mode === self::MODE_EXPLICIT) {
			$wrapper = Html::el();

			$el = Html::el('script type="text/javascript" async defer');
			$el->src = self::GOOGLE_PLATFORM_URL;
			$el->addText("{lang: '" . $this->lang . "', parsetags: 'explicit'}");
			$wrapper->addHtml($el);

			$el = Html::el('script type="text/javascript"');
			$el->addText('gapi.plusone.go();');
			$wrapper->addHtml($el);

			echo $wrapper;

		} elseif ($this->mode === self::MODE_DYNAMIC) {
			$el = Html::el('script type="text/javascript"');
			$el->addText("window.___gcfg = {lang: '" . $this->lang . "'};");
			$el->addText("(function(){var po=document.createElement('script');po.type='text/javascript';po.async=true;po.src='" . self::GOOGLE_PLATFORM_URL . "';vars=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po, s);})();");

			echo $el;
		}
	}
481288
protected function compile()
    {
        $attributes = new Attributes();

        $this->setLinkTitle($attributes);
        $this->setHref($attributes);
        $this->setCssClass($attributes);
        $this->enableLightbox($attributes);
        $this->setDataAttributes($attributes);

        // Override the link target
        if ($this->target) {
            $attributes->setAttribute('target', '_blank');
        }

        if ($this->bootstrap_icon) {
            $this->Template->icon = Bootstrap::generateIcon($this->bootstrap_icon);
        }

        $this->Template->attributes = $attributes;
        $this->Template->link       = $this->linkTitle;
    }
1029999
public function compile()
    {
        $compiledAssets = dirname(dirname(__DIR__)) . '/.build';

        $this->compileUi($compiledAssets);

        $finder = new Finder();
        $finder->files()
            ->ignoreVCS(true)
            ->name('*.php')
            ->name('*.yml')
            ->notName('UiTask.php')
            ->in(dirname(dirname(__DIR__)) . '/src');
        foreach ($finder as $file) {
            $this->addFile($file);
        }

        $finder = new Finder();
        $finder
            ->files()
            ->ignoreVCS(true)
            ->name('*.css')
            ->name('*.js')
            ->name('*.map')
            ->name('*.png')
            ->name('*.svg')
            ->name('*.html')
            ->name('*.otf')
            ->name('*.eot')
            ->name('*.ttf')
            ->name('*.woff')
            ->name('*.woff2')
            ->name('*.json')
            ->in($compiledAssets);
        foreach ($finder as $file) {
            /** @var SplFileInfo $file */
            $this->addFile($file, false, str_replace($compiledAssets, 'assets', $file->getRealPath()));
        }
    }
264978
private function render()
    {
        $str = $this->args['container_start'];

        if ($this->args['show_parent'] && $this->parent_page_id !== false) {
            $str .= $this->get_parent_link_html();
        }

        foreach ($this->pages as $page) {
            $str .= $this->get_link_html($page);
        }

        $str .= $this->args['container_end'];
        echo $str;
    }