public function setViewsDirectory(string $directory)
  {
    if (!is_dir($directory))
      return $this->exception(
        'Views directory "' . $directory . '" does not exist.'
      );

    $this->viewsDirectory = $directory;
    return $this;
  }