Chuyển đến nội dung
Tài liệu

Tra cứu lớp và hàm

Template

Danh sách các phương thức công khai của lớp Zittme\Framework\Template. Tài liệu này được tạo tự động từ mã nguồn lõi Zittme.

Nguồn: common/framework/Template.php

Phương thức công khai

  • static function getInstance()
  • Provided for compatibility with old TemplateHandler.
  • function __construct(?string $dirname = null, ?string $filename = null, ?string $extension = null)
  • You can also call the constructor directly.
  • function setCachePath(?string $cache_path = null)
  • Set the path for the cache file.
  • function disableCache()
  • Disable caching.
  • function exists()
  • Check if the template file exists.
  • function getParent()
  • Get the parent template.
  • function setParent(self $parent)
  • Set the parent template.
  • function getVars()
  • Get vars.
  • function setVars($vars)
  • Set vars.
  • function addVars($vars)
  • Add vars.
  • function compile(?string $dirname = null, ?string $filename = null, ?string $override_filename = null)
  • Compile and execute a template file.
  • function compileDirect(string $dirname, string $filename)
  • Compile a template and return the PHP code.
  • function parse(?string $content = null)
  • Convert template code to PHP using a version-specific parser.
  • function execute()
  • Execute the converted template and return the output.
  • function getFragment(string $name)
  • Get a fragment of the executed output.
  • function getStack(string $name)
  • Get the contents of a stack.
  • function isRelativePath(string $path)
  • Check if a path should be treated as relative to the path of the current template.
  • function convertPath(string $path, ?string $basepath = null)
  • Convert a relative path using the given basepath.
  • function normalizePath(string $path)
  • Normalize a path by removing extra slashes and parent directory references.