csstidy

# Class: csstidy_print Source Location: /class.csstidy_print.php
### Class Overview
CSS Printing class #### Author(s): Florian Schmitz (floele at gmail dot com) 2005-2006 #### Version: 1.0 | ### Variables $input_css $output_css $output_css_plain | ### Methods csstidy_print formatted get_diff get_ratio plain size _convert_raw_css _htmlsp _print _reset _seeknocomment
### Class Details [line 39] CSS Printing class This class prints CSS data generated by csstidy. #### Tags:
version: | 1.0
author: | Florian Schmitz (floele at gmail dot com) 2005-2006
[ Top ] ### Class Variables #### $input_css = '' [line 46] Saves the input CSS string #### Tags:
access: | private
Type: | string
[ Top ] #### $output_css = '' [line 53] Saves the formatted CSS string #### Tags:
access: | public
Type: | string
[ Top ] #### $output_css_plain = '' [line 60] Saves the formatted CSS string (plain text) #### Tags:
access: | public
Type: | string
[ Top ] ### Class Methods ### constructor csstidy_print [line 68]
`csstidy_print csstidy_print( array &$css)`
Constructor #### Tags:
version: | 1.0
access: | private
#### Parameters:
array | $css | contains the class csstidy
[ Top ] ### method formatted [line 108]
`string formatted( )`
Returns the formatted CSS code #### Tags:
version: | 1.0
access: | public
[ Top ] ### method get_diff [line 313]
`string get_diff( )`
Get difference between the old and new code in bytes and prints the code if necessary. #### Tags:
version: | 1.1
access: | public
[ Top ] ### method get_ratio [line 299]
`float get_ratio( )`
Get compression ratio #### Tags:
version: | 1.2
access: | public
[ Top ] ### method plain [line 96]
`string plain( )`
Returns the CSS code as plain text #### Tags:
version: | 1.0
access: | public
[ Top ] ### method size [line 337]
`integer size( [string $loc = 'output'])`
Get the size of either input or output CSS in KB #### Tags:
version: | 1.0
access: | public
#### Parameters:
string | $loc | default is "output"
[ Top ] ### method _convert_raw_css [line 244]
`void _convert_raw_css( )`
Converts $this->css array to a raw array ($this->tokens) #### Tags:
version: | 1.0
access: | private
[ Top ] ### method _htmlsp [line 285]
`string _htmlsp( string $string, bool $plain)`
Same as htmlspecialchars, only that chars are not replaced if $plain !== true. This makes print_code() cleaner. #### Tags:
version: | 1.0
access: | private
see: | csstidy_print::_print()
#### Parameters:
string | $string |
bool | $plain |
[ Top ] ### method _print [line 120]
`void _print( [bool $plain = false])`
Returns the formatted CSS Code and saves it into $this->output_css and $this->output_css_plain #### Tags:
version: | 2.0
access: | private
#### Parameters:
bool | $plain | plain text or not
[ Top ] ### method _reset [line 84]
`void _reset( )`
Resets output_css and output_css_plain (new css code) #### Tags:
version: | 1.0
access: | private
[ Top ] ### method _seeknocomment [line 225]
`mixed _seeknocomment( integer $key, integer $move)`
Gets the next token type which is $move away from $key, excluding comments #### Tags:
return: | a token type
version: | 1.0
access: | private
#### Parameters:
integer | $key | current position
integer | $move | move this far
[ Top ] Documentation generated on Mon, 15 May 2006 22:55:42 +0200 by phpDocumentor 1.3.0RC3