ZenMagick 0.9.10


org.zenmagick.mvc.view\ZMForwardView
mvc\view\ZMForwardView.php at line 32

Class ZMForwardView

ZMObject
└─ZMView
└─ZMForwardView

public class ZMForwardView
extends ZMView

Forward view.

This will forward the request to the given controller without a redirect.

Author:
DerManoMann

Method Summary
void

__construct()

Create a new forward view.

string

asUrl(mixed request, mixed template, string type, string filename, request The)

{@inheritDoc}

boolean

exists(mixed request, mixed template, string type, string filename, request The)

{@inheritDoc}

string

fetch(mixed request, string template, mixed type, request The)

{@inheritDoc}

string

generate(ZMRequest request)

{@inheritDoc}

string

getRequestId()

Get the request id of the redirect.

ZMViewUtils

getViewUtils()

{@inheritDoc}

boolean

isValid(ZMRequest request)

{@inheritDoc}

string

path(mixed template, string type, string filename)

{@inheritDoc}

void

setRequestId(string requestId)

Set the request id of the redirect.

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

Method Detail

mvc\view\ZMForwardView.php at line 39

__construct

public void __construct()

Create a new forward view.


mvc\view\ZMForwardView.php at line 89

asUrl

public string asUrl(mixed request, mixed template, string type, string filename, request The)

Resolve the given (relative) templates filename into a url.

Parameters:
The - current request.
filename - The filename, relative to the template path.
type - The lookup type; valid values are ZMView::TEMPLATE and ZMView::RESOURCE; default is ZMVIew::TEMPLATE.
Returns:
A url.

mvc\view\ZMForwardView.php at line 82

exists

public boolean exists(mixed request, mixed template, string type, string filename, request The)

Check if the given templates file exists.

Parameters:
The - current request.
filename - The filename, relative to the template path.
type - The lookup type; valid values are ZMView::TEMPLATE and ZMView::RESOURCE; default is ZMVIew::TEMPLATE.
Returns:
true if the file exists, false if not.

mvc\view\ZMForwardView.php at line 75

fetch

public string fetch(mixed request, string template, mixed type, request The)

Fetch/generate the contents of the given template.

Parameters:
The - current request.
template - The template name.
Returns:
The contents.

mvc\view\ZMForwardView.php at line 117

generate

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'

Parameters:
request - The current request.
Returns:
The contents.

mvc\view\ZMForwardView.php at line 58

getRequestId

public string getRequestId()

Get the request id of the redirect.

If not set, this will default to the template name (compatibility mode).

Returns:
The request id.

mvc\view\ZMForwardView.php at line 110

getViewUtils

public ZMViewUtils getViewUtils()

Get view utils.

Returns:
An instance of ZMViewUtils or null.

mvc\view\ZMForwardView.php at line 103

isValid

public boolean isValid(ZMRequest request)

Check if this view is valid.

This is optional and it is up to the specific subclass to implement as appropriate.

Parameters:
request - The current request.
Returns:
true if the view is valid.

mvc\view\ZMForwardView.php at line 96

path

public string path(mixed template, string type, string filename)

Resolve the given templates filename to a fully qualified filename.

Parameters:
filename - The filename, relative to the template path.
type - The lookup type; valid values are ZMView::TEMPLATE and ZMView::RESOURCE; default is ZMVIew::TEMPLATE.
Returns:
A fully qualified filename or null.

mvc\view\ZMForwardView.php at line 68

setRequestId

public void setRequestId(string requestId)

Set the request id of the redirect.

Parameters:
requestId - The request id.

ZenMagick 0.9.10