Fever Framework Update
Posted on 11. Feb, 2010 by Will Fitch in News, PHP Fever Framework
I just want to update everyone on the status of the framework. It is still on schedule for the February 26th release!
As we countdown to the public beta release, I want to keep you informed of some exciting functionality that’s being added.
Functionality
Along with the JSON controller, a new XML controller has been added. This allows you to return nearly anything from an action and it will automatically convert it to XML, send the proper content-type header and provide the data to the client. Here is an example of how it would work:
This will, in turn, produce the following XML document to the client:
-
<results>
-
<name>Will Fitch</name>
-
<attributes>
-
<height>76</height>
-
<hair>brown</hair>
-
<eyes>brown</eyes>
-
</attributes>
-
</results>
Now I’m sure there are those out there that are screaming, “But I want to customize the name of the elements!!!”. No problem! There is a method withing the AbstractXml controller called “setXmlElement” which accepts an instance of SimpleXMLElement. This will be used when converting data provided into XML.
This is all thanks to a new component called “XmlConverter” which lives in the \Fever\IO\Xml namespace. It follows the chain-of-command pattern and iterates until it finds the correct data type provided. Here are a list of converters available for iteration:
- ArrayToXml
- BooleanToXml
- NullToXml
- NumberToXml
- ObjectToXml
- StringToXml
All of these are separate entities, so they can be used independently.
I’ll continue to update throughout the upcoming days before the public beta!


![[del.icio.us]](http://www.willfitch.com/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.willfitch.com/wp-content/plugins/bookmarkify/digg.png)
![[Google]](http://www.willfitch.com/wp-content/plugins/bookmarkify/google.png)
![[LinkedIn]](http://www.willfitch.com/wp-content/plugins/bookmarkify/linkedin.png)
![[StumbleUpon]](http://www.willfitch.com/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Windows Live]](http://www.willfitch.com/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://www.willfitch.com/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://www.willfitch.com/wp-content/plugins/bookmarkify/email.png)

