Differences

This shows you the differences between two versions of the page.

sourceresolver [2016/02/10 22:39]
24.114.56.119
sourceresolver [2024/05/31 06:09] (current)
104.194.134.81 1
Line 2: Line 2:
You can create fake filesystems for PHPTAL templates. This lets you load templates //and macros// from any source, e.g. a database. You can create fake filesystems for PHPTAL templates. This lets you load templates //and macros// from any source, e.g. a database.
 +
===== Simplest way ===== ===== Simplest way =====
Line 7: Line 8:
If you don't use macros, you don't need ''SourceResolver'': If you don't use macros, you don't need ''SourceResolver'':
-     $phptal->setSource(load_source_from_anywhere());  // No source resolver necessary+     $phptal->setSource(load_source_from_anywhere());  // No source resolver necessary
===== Implementing custom source ===== ===== Implementing custom source =====