Class Css

Description

This class wraps a templated CSS file.


This is not a template system with a sub-language like Smarty!! This is only a utility that can help you to easily manage your own CSS templates. CSS templates are pure PHP templates (yhey're parsed by the standard PHP compiler)
You can assign template variables by dynamic typing:

  • author: Israel Viana <http://israelviana.es>
  • copyright: 2009 © Israel Viana <isra00@gmail.com>
  • todo: Add metric units control (i.e. $a->assign('width', 10, Css::Em) instead of dynamic typing)
  • license: GNU Public License
  • example: example

Located in /class.Css.php (line 51)


	
			
Class Constant Summary
 UA_CHROME = 40
 UA_FIREFOX = 20
 UA_GECKO = 20
 UA_IE = 10
 UA_IE6 = 5
 UA_MOZILLA = 20
 UA_SAFARI = 40
 UA_WEBKIT = 40
Method Summary
Css __construct ( $fileName, [ $userAgent = null])
string getOutput ()
int getUserAgent ()
mixed __get (string $name)
void __set (string $name, string $value)
string __toString ()
Methods
Constructor __construct (line 102)
  • access: public
Css __construct ( $fileName, [ $userAgent = null])
  • $fileName
  • $userAgent
getOutput (line 150)

Renders the CSS template, assigning values to variables

  • return: Rendered stylesheet
  • access: public
string getOutput ()
getUserAgent (line 174)

Gets the current user agent identified by the constants above

  • return: The user agent code
  • access: public
int getUserAgent ()
__get (line 118)

Gets a template variable $name

  • return: The value for the specified template variable
  • access: public
mixed __get (string $name)
  • string $name: The name of the variable
__set (line 129)

Sets a template variable

  • access: public
void __set (string $name, string $value)
  • string $name: The name for the variable
  • string $value: The value for the variable
__toString (line 140)

This method is used when you use a Css instance as a string, returning the rendered template

  • return: The rendered template
  • access: public
string __toString ()
Class Constants
UA_CHROME = 40 (line 80)

Alias of UA_WEBKIT

UA_FIREFOX = 20 (line 71)

Alias of UA_GECKO

UA_GECKO = 20 (line 65)

Geckp-based user agents

UA_IE = 10 (line 62)

Internet Explorer >6 user agent

UA_IE6 = 5 (line 59)

Internet Explorer 6 user agent

UA_MOZILLA = 20 (line 68)

Alias of UA_GECKO

UA_SAFARI = 40 (line 77)

Alias of UA_WEBKIT

UA_WEBKIT = 40 (line 74)

WebKit-based user agents

Documentation generated on Tue, 25 Aug 2009 12:42:21 +0200 by phpDocumentor 1.4.2