ZenMagick 0.9.6


org.zenmagick.rp.ZMView

Class ZMView

ZMObject
|
+--ZMView

public class ZMView
extends ZMObject

A view.

Author:
DerManoMann
Version:
$Id: ZMView.php 2168 2009-04-17 05:13:14Z dermanomann $

Field Summary
protected mixed

$controller_

protected mixed

$subdir_

protected mixed

$viewId_

protected mixed

$view_

Fields inherited from org.zenmagick.ZMObject
properties_
Constructor Summary

ZMView(string view, mixed viewId, string mapping)

Create new view for the given view name and id.

Method Summary
boolean

callView()

Call the function that generates the view contents.

void

generate()

Generate view response.

string

getContentType()

Get the content type.

ZMController

getController()

Get the controller for this view.

string

getEncoding()

Get the character encoding.

string

getName()

Return the view name.

subdir

getSubdir()

Get optional subdir.

string

getView()

Get the view.

string

getViewFilename()

Returns the full view filename to be included by a template.

string

getViewId()

Get the view id.

boolean

isValid()

Check if this view is valid.

boolean

isViewFunction()

Check if the response is generated by a function or file.

void

setController(mixed controller, controller ZMController)

Set the controller for this view.

void

setName(string name)

Set the view name.

void

setSubdir(string subdir)

Set an optional subdir.

void

setView(string view)

Set the view.

void

setViewId(string viewId)

Set the view id.

Methods inherited from org.zenmagick.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Field Detail

controller_

protected mixed $controller_

subdir_

protected mixed $subdir_

viewId_

protected mixed $viewId_

view_

protected mixed $view_

Constructor Detail

ZMView

public ZMView(string view, mixed viewId, string mapping)

Create new view for the given view name and id.

Parameters:
view - The view template name; default is null.
mapping - The mapping id; default is null.
Deprecated::
contructor arguments

Method Detail

callView

public boolean callView()

Call the function that generates the view contents.

Returns:
true if the view was generated using a function.

generate

public void generate()

Generate view response. /


getContentType

public string getContentType()

Get the content type.

Returns:
The content type.

getController

public ZMController getController()

Get the controller for this view.

Returns:
The corresponding controller.

getEncoding

public string getEncoding()

Get the character encoding.

Returns:
The encoding.

getName

public string getName()

Return the view name.

Returns:
The view name.

getSubdir

public subdir getSubdir()

Get optional subdir.

Returns:
The subdirectory.

getView

public string getView()

Get the view.

Returns:
The view.

getViewFilename

public string getViewFilename()

Returns the full view filename to be included by a template.

Returns:
The full view filename.

getViewId

public string getViewId()

Get the view id.

Returns:
The view id.

isValid

public boolean isValid()

Check if this view is valid.

Returns:
true if the view is valid, false if not.

isViewFunction

public boolean isViewFunction()

Check if the response is generated by a function or file.

Returns:
true if the view content is generated * by a function, false if not.

setController

public void setController(mixed controller, controller ZMController)

Set the controller for this view.

Parameters:
ZMController - The corresponding controller.

setName

public void setName(string name)

Set the view name.

Parameters:
name - The view name.

setSubdir

public void setSubdir(string subdir)

Set an optional subdir.

Parameters:
subdir - The subdirectory.

setView

public void setView(string view)

Set the view.

Parameters:
view - The view.

setViewId

public void setViewId(string viewId)

Set the view id.

Parameters:
viewId - The view id.

ZenMagick 0.9.6