$a = new A();Calling write() on this A (a link/anchor tag) produces a well formed link, an <a> tag, with all of the correct attributes set. This frees the developer from having to hand write HTML in a web-application. Even more importantly, Gagawa virtually eliminates missed closing tags and other mundane HTML typos that often haunt web-developers. See the Gagawa PHP Example for more sample code.
// Note you can daisy chain attribute setters.
$a->setHref( "http://kolich.com" )
->setTarget("_blank")
->setCSSClass("linkclass")
->setId("myid")
->setAttribute("other","value");
echo $a->write();
Download the complete pre-packaged Gagawa PHP library here. To include the library in your PHP application, use require_once("gagawa-1.0.php").


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