/** * Ensures the page has been loaded from disk. */ protected function ensureContentsLoaded() { if (!$this->didFormatContents) { $this->ensureConfigLoaded(); $loader = new PageLoader($this); $this->contents = $loader->formatContents($this->contents); $this->didFormatContents = true; } }
/** * Ensures the page has been formatted completely. */ protected function ensureContentsFormatted() { if ($this->formattedContents == null) { $this->ensureConfigLoaded(); $loader = new PageLoader($this); $this->formattedContents = $loader->formatContents($this->contents); foreach ($this->observers as $observer) { $observer->onPageFormatted($this); } } }