PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Zend_Application_Resource_View

Zend_Application_Resource_View can be used to configure a Zend_View instance. Configuration options are per the Zend_View options.

Once done configuring the view instance, it creates an instance of Zend_Controller_Action_Helper_ViewRenderer and registers the ViewRenderer with Zend_Controller_Action_HelperBroker -- from which you may retrieve it later.

Example 52. Sample View resource configuration

Below is a sample INI snippet showing how to configure the view resource.

resources.view.encoding = "UTF-8"
resources.view.basePath = APPLICATION_PATH "/views/"

Defining doctype to use

If you want to obtain more information about values, see Doctype Helper .

Example 53. Sample doctype configuration

The following snippet shows how to set a doctype.

resources.view.doctype = "HTML5"

Defining content type and encoding to use

If you want to obtain more information about values, see HeadMeta Helper .

Example 54. Sample content type and encoding configuration

The following snippet shows how to set a meta Content-Type.

resources.view.contentType = "text/html; charset=UTF-8"

Example 55. Sample encoding configuration for a HTML5 document

The following snippet shows how to set a meta charset in HTML5-style.

resources.view.doctype = "HTML5"
resources.view.charset = "UTF-8"

Zend Framework