code: public function addSnippet(string $snptName): void
      {
          $this->snippets[$snptName] = ViewFactory::createSnippet($snptName);
      }
docs: It adds snippet to the view object.
  @param string $snptName
  @return void