Gagawa PHP 1.2-beta Released!

| 1 TrackBack
I released Gagawa PHP 1.2-beta on Google Code this afternoon. This version contains a fix for an important enhancement which was requested here on June 24th.  Prior to this release, the Doctype class was not properly declaring the correct HTML/XHTML document type.  Gagawa PHP 1.2-beta has been enhanced to support Doctypes defined by the user.  I've also added a Document class, that lets the user build a complete HTML document like so:

<?php

require_once("gagawa.php");

// A set of all common Doctypes are defined as const's
// in the new Doctype class. This example is using
// HTMLStrict.
$d = new Document( Doctype::HTMLStrict );

$div = new Div();
$div->setId("mydiv")->setCSSClass("myclass");
$div->appendChild( new Text("some text in a div") );

$title = new Title();
$title->appendChild( new Text("Page title!") );

// The new Document class defines two public class
// members, a head_ and body_. These Head() and Body()
// objects let the user build a complete HTML page.
$d->head_->appendChild( $title );
$d->body_->appendChild( $div );

echo $d->write();

?>

Special thanks to @namibcoder for reporting this missing piece of important functionality to us on our Google Code homepage.

Did You Find this Helpful?

Did you find this post helpful, or at least, interesting?

  

Send Mark a Direct Message

If you'd like to send me a direct message, please do so below. However, I do not publicly post comments or messages submitted directly to me. So, if you're going to try to SPAM me, or my blog, you're pretty much wasting your time.

400 characters remaining

Error

About Mark

A Silicon Valley native, Mark Kolich is a full-time Software Engineer, a casual entrepreneur, and a consultant for hire. A web technologies expert, his current focus is on building powerful and robust cloud-driven web-applications using Java, PHP, Perl, AJAX, DHTML, CSS, and JavaScript. His favorite programming languages are PHP, Java and JavaScript. He uses Linux, enjoys biking to work, loves building great software, and always writes elegant, readable, and maintainable code.

1 TrackBack

Last year I wrote up a quick blog post to ring in the New Year, highlighting some of my accomplishments and failures of 2008.  In that spirit, keeping the tradition alive, here's my 2009 in a nutshell:I kicked off 2009... Read More

Twitter (@markkolich)

Translate

About this Entry

This page contains a single entry by Mark Kolich published on July 13, 2009 5:35 PM.

HOWTO: Prevent Hot-linking of Your Images Using Apache's mod_rewrite Engine was the previous entry in this blog.

HOWTO: Include Base-64 Encoded Binary Image Data (data URI scheme) in Inline Cascading Style Sheets (CSS) is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.