| created with PHPDoc 1.0alpha (modified) |
|
|
|
|
dynamic_CSSdynamic_CSS
|
private class dynamic_CSS This class provides functions for
parsing, storing and returning CSS style sheets. It stores the CSS
styles in a MySql database with an owner id and a theme id. The main
purpose for this class is to provide different CSS styles for different
user and themes. The constructor expects an MySQL link identifier
and the name of the MySql-Database as arguments. (See
example)
Copyright (C) 2004 Nico de Haen
<mail@ndh-websolutions.de>
$Id: dynamic_CSS.class.php,v 0.9 2004/04/04 |
| |
|
|
|
|
|
|
|
|
dynamic_CSS |
| public
void dynamic_CSS( )
|
| |
Constructor defines public connection
parameters and call the connect method
optional parameter (if
not connected to database): $host, $user, $password, $database
|
| Returns |
void
|
|
|
parse_css |
| public
array parse_css( string $str )
|
| Parameter |
|
|
| |
parses a string, for style sheet
informations and stores all the styles in a multi leveled
array key of the 1st level array is the style name, key of the
2nd level arrays is the style property name (i.e. color,
font-size etc.)
|
| Returns |
array $style_arr
|
|
|
print_css |
| public
void print_css( $id, $owner )
|
| Parameter |
|
|
|
|
| |
prints a complete style sheet
tag
Gets the style info from the database and transforms it
into appropriate form
|
| Returns |
void
|
|
|
get_style_arr |
| public
array get_style_arr( $id, $owner )
|
| Parameter |
|
|
|
|
| |
gets a style array from
database
Gets the style info from the database and transforms
it into appropriate form
|
| Returns |
array
style_arr |
|
|
debug |
| public
string debug( )
|
| |
returns a string with all warnings that
occured
|
| Returns |
string
warnings |
|
| |
mysql_check |
| private
boolean mysql_check( )
|
| |
checks, weither the MySQL server is
reachable tries to connect with the parameters set by the
constructor returns false if it fails
|
| Returns |
boolean
if mysql_ping or connect successfull |
|
|
save_to_db |
| private
void save_to_db( string $id, $owner, $str, $db )
|
| Parameter |
|
| string |
$id |
|
|
CSS style sheet
data | |
|
|
|
|
|
|
| |
stores the styles in the
database primary keys are the theme id and the owner id. both
can be chosen freely
|
| Returns |
void
|
|
|
print_style_arr |
| private
void print_style_arr( $style_arr )
|
| Parameter |
|
|
| |
|
| Returns |
void
|
|
| |
|
|
|
|
| |