Savant3
└─ZMSavant
public class ZMSavant
extends Savant3
| Constructor Summary | |
|---|---|
ZMSavant(mixed config) Create a new instance. |
|
| Method Summary | |
|---|---|
| string | asUrl(string filename) Resolve the given (relative) resource filename into a url. |
| boolean | exists(string filename) Check if the given resource file exists. |
| void | fetch(mixed tpl) {@inheritDoc} Adds a hook for flexible caching. |
| string | path(string filename) Resolve the given resource filename to a fully qualified filename. |
public ZMSavant(mixed config)
Create a new instance.
public string asUrl(string filename)
Resolve the given (relative) resource filename into a url.
public boolean exists(string filename)
Check if the given resource file exists.
true if the file exists, false if not.public void fetch(mixed tpl)
Adds a hook for flexible caching.
public string path(string filename)
Resolve the given resource filename to a fully qualified filename.
null.
Custom Savant(3).
Adds some convenience methods to access resources.
ATTENTION: These methods only make sense if called from within a template.
Also, adds support for caching. The config map supports a key cache that is expected to be a class name that implements the following two methods:
get($tpl)nullshould be returned.save($tpl, $result)It should be noted that it is the reponsibility of the cache class to decide whether a given template can be cached or not.