Overview

Packages

  • csstidy
  • Text
    • Filter

Classes

  • csstidy
  • csstidy_optimise
  • csstidy_print
  • Overview
  • Package
  • Class
  • Tree

Class csstidy_print

CSS Printing class

This class prints CSS data generated by csstidy.

Package: csstidy
Author: Florian Schmitz (floele at gmail dot com) 2005-2006
Version: 1.0
Located at Horde/Text/Filter/Csstidy/class.csstidy_print.php
Methods summary
public
# csstidy_print( array & $css )

Constructor

Constructor

Parameters

$css
contains the class csstidy

Version

1.0
public
# _reset( )

Resets output_css and output_css_plain (new css code)

Resets output_css and output_css_plain (new css code)

Version

1.0
public string
# plain( )

Returns the CSS code as plain text

Returns the CSS code as plain text

Returns

string

Version

1.0
public string
# formatted( )

Returns the formatted CSS code

Returns the formatted CSS code

Returns

string

Version

1.0
public
# _print( boolean $plain = false )

Returns the formatted CSS Code and saves it into $this->output_css and $this->output_css_plain

Returns the formatted CSS Code and saves it into $this->output_css and $this->output_css_plain

Parameters

$plain
plain text or not

Version

2.0
public mixed
# _seeknocomment( integer $key, integer $move )

Gets the next token type which is $move away from $key, excluding comments

Gets the next token type which is $move away from $key, excluding comments

Parameters

$key
current position
$move
move this far

Returns

mixed
a token type

Version

1.0
public
# _convert_raw_css( )

Converts $this->css array to a raw array ($this->tokens)

Converts $this->css array to a raw array ($this->tokens)

Version

1.0
public string
# _htmlsp( string $string, boolean $plain )

Same as htmlspecialchars, only that chars are not replaced if $plain !== true. This makes print_code() cleaner.

Same as htmlspecialchars, only that chars are not replaced if $plain !== true. This makes print_code() cleaner.

Parameters

$string
$plain

Returns

string

Version

1.0

See

csstidy_print::_print()
public float
# get_ratio( )

Get compression ratio

Get compression ratio

Returns

float

Version

1.2
public string
# get_diff( )

Get difference between the old and new code in bytes and prints the code if necessary.

Get difference between the old and new code in bytes and prints the code if necessary.

Returns

string

Version

1.1
public integer
# size( string $loc = 'output' )

Get the size of either input or output CSS in KB

Get the size of either input or output CSS in KB

Parameters

$loc
default is "output"

Returns

integer

Version

1.0
Properties summary
public string $input_css

Saves the input CSS string

Saves the input CSS string

# ''
public string $output_css

Saves the formatted CSS string

Saves the formatted CSS string

# ''
public string $output_css_plain

Saves the formatted CSS string (plain text)

Saves the formatted CSS string (plain text)

# ''
API documentation generated by ApiGen