ZMObject
└─ZMView
public abstract class ZMView
extends ZMObject
| Fields inherited from org.zenmagick.core.ZMObject | |
|---|---|
| properties_ | |
| Constructor Summary | |
|---|---|
ZMView() Create new instance. |
|
| Method Summary | |
|---|---|
| abstract string | fetch(mixed request, string template, request The) Fetch/generate the contents of the given template. |
| string | Shortcut to generate the contents for the currenty set template. |
| string | Get the content type for this view. |
| string | Get the content encoding. |
| string | Get the template name. |
| array | getVars() Get all available variables in this view. |
| string | Get the view id. |
| boolean | isValid() Check if this view is valid. |
| void | setTemplate(string template) Set the template name. |
| void | setVar(string name, mixed value) Make a variable (value) available under the given name. |
| void | setVars(array vars) Set multiple variables. |
| void | setViewId(string viewId) Set the view id. |
| Methods inherited from org.zenmagick.core.ZMObject | |
|---|---|
| attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton | |
public ZMView()
Create new instance.
public abstract 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'
public string getContentType()
Get the content type for this view.
Return the value of the setting zenmagick.mvc.html.contentType or text/html as default.
null.public string getEncoding()
Get the content encoding.
Return the value of the setting zenmagick.mvc.html.charset or UTF-8 as default.
public string getTemplate()
Get the template name.
public array getVars()
Get all available variables in this view.
public string getViewId()
Get the view id.
public boolean isValid()
Check if this view is valid.
This is optional and it is up to the specific subclass to implement as appropriate.
true if the view is valid.public void setTemplate(string template)
Set the template name.
public void setVar(string name, mixed value)
Make a variable (value) available under the given name.
public void setVars(array vars)
Set multiple variables.
public void setViewId(string viewId)
Set the view id.
Base implementation of the
ZMViewinterface.