code: protected function setLayout(string $layoutName): void
      {
          if (is_null($this->view)) {
              throw new Exception("It's unable to set Layout without View.");
          }
          $this->layout = ViewFactory::createLayout($layoutName, $this->view);
      }
docs: It assosiates the controller with the layout.
  @param string $layoutName The layout name.
  @return void
  @throws \nadir2\core\Exception It's thrown if the layout doesn't contain
  a view.