Re: HTML_CSS

From: Date: Thu, 22 Jan 2009 04:07:31 +0000
Subject: Re: HTML_CSS
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29625@lists.php.net to get a copy of this message
On Thu, Jan 22, 2009 at 10:29 AM, Al <news@ridersite.org> wrote: > Just curious. Has anyone used this class and its associates? > > I must be missing something as it seems to require as much code as simply > writing the css text itself. > > Perhaps sending the string directly to the client's browser may be helpful. > though I haven't tried it. > > Al......... > > I think where this can be better than plain old CSS would be along the lines of: // Include.php // Wiring our application together ahead of time; great for testability! $app = new Application(); $app->setCSSHandler(new HTML_CSS()); $app->add(new Button()); $app->add(new Button()); $app->add(new ComboButton()); // render.php // This is all just one bit of CSS which has been built up by all of // the components added, dynamically, without having to render // directly to the browser // Since application construction and rendering are seperated, the design is somewhat cleaner :) print $app->renderCSS(); print $app->renderHTML(); // Just renders HTML

« previous php.pear.general (#29625) next »