code: public function assign(string $key, $value, bool $global = false)
      {
          // Assign a new view variable (global or locale)
          if ($global === false) {
              $this->vars[$key] = $value;
          } else {
              View::$global_vars[$key] = $value;
          }
  
          return $this;
      }
docs: Assign a view variable.
  
  $view->assign('msg', 'Some message...');
  
  @param  string  $key    Variable name
  @param  mixed   $value  Variable value
  @param  bool $global Set variable available in all views
  @return View