| [ PHPXref.com ] | [ Generated: Sun Jul 20 17:19:34 2008 ] | [ dompdf 0.5 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Source view] [Print]
DOMPDF - PHP5 HTML to PDF renderer File: $RCSfile: stylesheet.cls.php,v $ Created on: 2004-06-01
| Author: | Benj Carson |
| Copyright: | 2004 Benj Carson |
| Version: | 0.3 |
| File Size: | 841 lines (22 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
Stylesheet:: (17 methods):
__construct()
set_protocol()
set_host()
set_base_path()
add_style()
lookup()
create_style()
load_css()
load_css_file()
_specificity()
_css_selector_to_xpath()
apply_styles()
_parse_css()
_parse_import()
_parse_properties()
_parse_sections()
__toString()
Class: Stylesheet - X-Ref
The master stylesheet class| __construct() X-Ref |
| The class constructor. The base protocol, host & path are initialized to those of the current script. |
| set_protocol($proto) X-Ref |
| Set the base protocol param: string $proto |
| set_host($host) X-Ref |
| Set the base host param: string $host |
| set_base_path($path) X-Ref |
| Set the base path param: string $path |
| add_style($key, Style $style) X-Ref |
| add a new Style object to the stylesheet add_style() adds a new Style object to the current stylesheet, or merges a new Style with an existing one. param: string $key the Style's selector param: Style $style the Style to be added |
| lookup($key) X-Ref |
| lookup a specifc Style object lookup() returns the Style specified by $key, or null if the Style is not found. param: string $key the selector of the requested Style return: Style |
| create_style() X-Ref |
| create a new Style object associated with this stylesheet return: Style |
| load_css(&$css) X-Ref |
| load and parse a CSS string param: string $css |
| load_css_file($file) X-Ref |
| load and parse a CSS file param: string $file |
| _specificity($selector) X-Ref |
param: string $selector return: int |
| _css_selector_to_xpath($selector) X-Ref |
| converts a CSS selector to an XPath query. param: string $selector return: string |
| apply_styles(Frame_Tree $tree) X-Ref |
| applies all current styles to a particular document tree apply_styles() applies all currently loaded styles to the provided {@link Frame_Tree}. Aside from parsing CSS, this is the main purpose of this class. param: Frame_Tree $tree |
| _parse_css($str) X-Ref |
| parse a CSS string using a regex parser Called by {@link Stylesheet::parse_css()} param: string $str |
| _parse_import($url) X-Ref |
| parse @import{} sections param: string $url the url of the imported CSS file |
| _parse_properties($str) X-Ref |
| parse regular CSS blocks _parse_properties() creates a new Style object based on the provided CSS rules. param: string $str CSS rules return: Style |
| _parse_sections($str) X-Ref |
| parse selector + rulesets param: string $str CSS selectors and rulesets |
| __toString() X-Ref |
| dumps the entire stylesheet as a string Generates a string of each selector and associated style in the Stylesheet. Useful for debugging. return: string |
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |