News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SmartyCode.com:
Serving XHTML in Zend Framework App
April 27, 2009 @ 07:55:39

On the SmartyCode.com site, there was a new article posted recently looking at making the output of your Zend Framework application XHTML compliant.

Serving XHTML is often misunderstood by php developers. Frontend engineers simply include the XHTML doctype to their documents, without actually serving document as XHTML. This triggers majority of the browsers to treat such pages as 'tag-soup'. [...] This front controller plugin's code mostly takes concepts from the excellent article by Keystone Websites, but implements in Zend Framework environment in an object-oriented way.

The code works as a plugin to the controller and runs a few checks on the contents of the data being pushed out (dispatchLoopShutdown) and returns the correct header information (DOCTYPE, language attribute) in the correct XHTML format for the data. When the plugin is registered, all it takes is a call to the "doctype()" method to output the correct information.

1 comment voice your opinion now!
zendframework xhtml doctype serve format plugin controller


blog comments powered by Disqus

Similar Posts

Jani Hartikainen's Blog: Another idea for using models with forms

Maurice Fonk's Blog: Smarty and the Zend Framework

PHP 10.0 Blog: Benchmarking Zend Framework loader

PHP-GTK Community Site: Accessing geo-nick with Zend Framework (Zend_XmlRpc_Client)

PHPBuilder.com: Create a Unit Conversion Application w/the Zend_Measure Component


Community Events

Don't see your event here?
Let us know!


series opinion wordpress development conference api extension laravel5 release language library laravel podcast introduction community voicesoftheelephpant middleware framework interview unittest

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework