ZMObject
└─ZMView
└─ZMSavantView
public class ZMSavantView
extends ZMView
| Method Summary | |
|---|---|
| void | Create new instance. |
| string | asUrl(mixed request, string filename, string type, request The) {@inheritDoc} |
| boolean | exists(mixed request, string filename, string type, request The) {@inheritDoc} |
| string | fetch(mixed request, string template, request The) {@inheritDoc} |
| string | {@inheritDoc} |
| protected array | Get a list of filter instances. |
| string | Get the configured filters. |
| string | Get the layout name. |
| array | getResourcePath(ZMRequest request) Get the array of locations to search for resources. |
| Savant3 | Get a preconfigured Savant3 instance. |
| string | {@inheritDoc} |
| array | getTemplatePath(ZMRequest request) Get the array of locations to search for templates. |
| string | Get the views dir. |
| ZMViewUtils | {@inheritDoc} |
| string | path(string filename, string type) {@inheritDoc} |
| void | setConfig(mixed config) Set savant specific configuration options. |
| void | setFilters(string filters) Set the filters. |
| void | setLayout(string layout) Set the layout name. |
| void | setViewDir(string viewDir) Set the views dir. |
| Methods inherited from org.zenmagick.mvc.view\ZMView | |
|---|---|
| __construct, asUrl, exists, fetch, generate, getContentType, getEncoding, getTemplate, getVar, getVars, getViewId, getViewUtils, isValid, path, setTemplate, setVar, setVars, setViewId | |
| Methods inherited from org.zenmagick.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton | |
public void __construct()
Create new instance.
public string asUrl(mixed request, string filename, string type, request The)
Resolve the given (relative) templates filename into a url.
ZMView::TEMPLATE and ZMView::RESOURCE; default is ZMVIew::TEMPLATE.public boolean exists(mixed request, string filename, string type, request The)
Check if the given templates file exists.
ZMView::TEMPLATE and ZMView::RESOURCE; default is ZMVIew::TEMPLATE.true if the file exists, false if not.public string fetch(mixed request, string template, request The)
Fetch/generate the contents of the given template.
public string generate(ZMRequest request)
Shortcut to generate the contents for the currenty set template.
The template extension is taken from the 'zenmagick.mvc.templates.ext'
protected array getFilterList()
Get a list of filter instances.
public string getFilters()
Get the configured filters.
null.public string getLayout()
Get the layout name.
public array getResourcePath(ZMRequest request)
Get the array of locations to search for resources.
This default implementation will just return getTemplatePath($request).
public Savant3 getSavant(ZMRequest request)
Get a preconfigured Savant3 instance.
public string getTemplate()
Get the template name.
public array getTemplatePath(ZMRequest request)
Get the array of locations to search for templates.
public string getViewDir()
Get the views dir.
public ZMViewUtils getViewUtils()
Get view utils.
ZMViewUtils or null.public string path(string filename, string type)
Resolve the given templates filename to a fully qualified filename.
ZMView::TEMPLATE and ZMView::RESOURCE; default is ZMVIew::TEMPLATE.null.public void setConfig(mixed config)
Set savant specific configuration options.
public void setFilters(string filters)
Set the filters.
public void setLayout(string layout)
Set the layout name.
public void setViewDir(string viewDir)
Set the views dir.
A Savant(3) view.
This class also introduced support for layouts.
The default
viewDirvalue is views/.