File code/addon/View.php

class Lia\Addon\View

See source code at /code/addon/View.php

Constants

Properties

  • public string $fqn = 'lia:server.view';
  • public string $name = 'view';
  • public $views = [null=>[]]; Views to be loaded.
  • public array $packages = []; a lazy way to map viewname => package
  • public array $globalArgs = []; Args to pass to every view

Methods

  • public function init_lia()
  • public function getHeadHtml()
  • public function addDir($dir, $package)
  • public function addView($view_name, $dir)
  • public function addViewFile($view_name, $file)
  • public function addViewCallable($view_name, $callable)
  • public function view($name, $args=[])
  • public function show_file($view, $args)
  • public function show_callable($view, $args)
  • public function show_main($view, $args)
  • public function addFiles($dir) add resource files in the given directory
  • public function change_namespace(string $original_namespace, string $new_namespace, bool $allow_overrides = false) Rename the original_namespace to the new_namespace. The old namespace is removed.
    Only affects views already added.