PHP Classes

File: v1/README.md

Recommend this page to a friend!
  Classes of Thomas Björk   CSS parser   v1/README.md   Download  
File: v1/README.md
Role: Auxiliary data
Content type: text/markdown
Description: Moved the old cssparser to the folder v1 and created a folder v2 with a new CSSParser. The new version is not backwards compatible with the old version. But I've decided to release it in the same package as the old one since it is such an improvement over the old code which was based on code made for PHP4 in 2003.
Class: CSS parser
CSS parser class
Author: By
Last change: Update of v1/README.md
Date: 3 months ago
Size: 1,126 bytes
 

Contents

Class file image Download

CSSParser

The cssparser is a small class that enables you to parse css information. The parsed css information can then be used in your application to fill your needs to use css information.

Clear();

Clears the current content. If the html property of the class is set to true then the propertylist is filled with standard html information.

SetHTML($html);

Set how to handle standard html information with clear. Set to true to include html properties and false to exclude it.

Add($key, $codestr);

Add a new propertystring to th list. The key represents under which tag/id/class/subclass to store the information. The codestr is a string of css properties. Each property should be separated by a ;. Values should be separated from the propertynames by a :.

Get($key, $property);

Retreive the value of a property.

GetSection($key);

Retreive all properties associated with the given key.

ParseStr($str);

Parse a textstring that contains css information.

Parse($filename);

Parse a file that contains css information.

GetCSS();

Returns a brute style css text compiled of the different properties.