/** * Get the evaluated contents of the object. * * @return string */ public function render() { if ($this->cacheKey === null) { throw new InvalidArgumentException('A cache key must be specified'); } if ($this->updatedAt === null) { throw new InvalidArgumentException('A updated at timestamp must be specified'); } if ($this->template == null) { throw new InvalidArgumentException('A valid template does not exist.'); } if ($this->render == null) { $this->render = $this->template->render($this->data); } return $this->render; }