Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Israel Viana  >  CSS Dispatcher  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example of CssDispatcher
Class: CSS Dispatcher
Compose CSS style sheets from multiple templates
Author: By
Last change:
Date: 2009-10-21 08:31
Size: 642 bytes
 

Contents

Class file image Download
<?php

/**
 * @package CssDispatch
 */

/** Includes the library classes */
include 'class.Css.php';
include 
'class.CssDispatcher.php';

$estilos = new CssDispatcher;

//Creates a new template
$general = new Css('example.css.php');
//Assigns some variables
$general->background '#eee';
$general->border_color 'red';
$general->header_size 2.1;

//Creates another template for WebKit-based browsers
$another = new Css('example2.css.php'Css::UA_WEBKIT);
$another->bold 'font-weight: bold';

//Adds the templates to the dispatcher
$estilos->add($general);
$estilos->add($another);

$estilos->render();

?>