MIOLO25
|
Atributos Públicos Estáticos | |
static | $default_font_size = 12 |
static | $default_line_height = 1.2 |
static | $INLINE_TYPES = array("inline") |
static | $BLOCK_TYPES = array("block","inline-block", "table-cell", "list-item") |
static | $TABLE_TYPES = array("table", "inline-table") |
static | $BORDER_STYLES |
Membros protegidos | |
_get_border ($side) | |
_set_border ($side, $border_spec) | |
Atributos Protegidos | |
$_stylesheet | |
$_props | |
$_prop_cache | |
$_parent_font_size | |
Atributos Protegidos Estáticos | |
static | $_defaults = null |
static | $_inherited = null |
__construct | ( | Stylesheet | $stylesheet | ) |
Class constructor
Stylesheet | $stylesheet | the stylesheet this Style is associated with. |
__get | ( | $prop | ) |
PHP5 overloaded getter
Along with Style::__set()
__get() provides access to all CSS properties directly. Typically __get() is not called directly outside of this class.
string | $prop |
__set | ( | $prop, | |
$val ) |
PHP5 overloaded setter
This function along with Style::__get()
permit a user of the Style class to access any (CSS) property using the following syntax: Style->margin_top = "1em"; echo (Style->margin_top);
__set() automatically calls the provided set function, if one exists, otherwise it sets the property directly. Typically, __set() is not called directly from outside of this class.
string | $prop | the property to set |
mixed | $val | the value of the property |
__toString | ( | ) |
Generate a string representation of the Style
This dumps the entire property array into a string via print_r. Useful for debugging.
|
protected |
Return a single border property
|
protected |
#- Sets a single border
string | $side | |
string | $border_spec | ([width] [style] [color]) |
dispose | ( | ) |
"Destructor": forcibly free all references held by this object
get_background_color | ( | ) |
Returns the background colour as an array
The returned array has the same format as Style::get_color()
get_background_position | ( | ) |
Returns the background position as an array
The returned array has the following format: array(x,y, "x" => x, "y" => y)
get_border_bottom | ( | ) |
get_border_bottom_color | ( | ) |
get_border_bottom_width | ( | ) |
get_border_left | ( | ) |
get_border_left_color | ( | ) |
get_border_left_width | ( | ) |
get_border_properties | ( | ) |
#- Return an array of all border properties.
The returned array has the following structure: array("top" => array("width" => [border-width], "style" => [border-style], "color" => [border-color (array)]), "bottom" ... )
get_border_right | ( | ) |
get_border_right_color | ( | ) |
get_border_right_width | ( | ) |
get_border_spacing | ( | ) |
get_border_top | ( | ) |
#+ Return full border properties as a string
Border properties are returned just as specified in CSS:
[width] [style] [color]
e.g. "1px solid blue"
get_border_top_color | ( | ) |
get_border_top_width | ( | ) |
#- #+ Returns the border width, as it is currently stored
get_color | ( | ) |
Returns the colour as an array
The array has the following format: array(r,g,b, "r" => r, "g" => g, "b" => b, "hex" => "#rrggbb")
get_font_family | ( | ) |
Getter for the 'font-family' CSS property.
Uses the Font_Metrics
class to resolve the font family into an actual font file.
get_font_size | ( | ) |
Returns the resolved font size, in points
http://www.w3.org/TR/CSS21/fonts.html#propdef-font-size
get_line_height | ( | ) |
get_stylesheet | ( | ) |
returns the Stylesheet
this Style is associated with.
get_word_spacing | ( | ) |
inherit | ( | Style | $parent | ) |
Set inherited properties in this style using values in $parent
Style | $parent |
length_in_pt | ( | $length, | |
$ref_size = null ) |
Converts any CSS length value into an absolute length in points.
length_in_pt() takes a single length (e.g. '1em') or an array of lengths and returns an absolute length. If an array is passed, then the return value is the sum of all elements.
If a reference size is not provided, the default font size is used (Style::$default_font_size
).
float | array | $length | the length or array of lengths to resolve |
float | $ref_size | an absolute reference size to resolve percentage lengths |
munge_color | ( | $color | ) |
munge_colour | ( | $colour | ) |
Returns an array(r, g, b, "r"=> r, "g"=>g, "b"=>b, "hex"=>"#rrggbb") based on the provided CSS colour value.
string | $colour |
set_background_color | ( | $colour | ) |
Sets the background colour
set_background_image | ( | $val | ) |
Set the background image url
set_border | ( | $val | ) |
set_border_bottom | ( | $val | ) |
set_border_color | ( | $val | ) |
set_border_left | ( | $val | ) |
set_border_right | ( | $val | ) |
set_border_spacing | ( | $val | ) |
#- Sets the border spacing
set_border_style | ( | $val | ) |
set_border_top | ( | $val | ) |
#+ Sets the border styles
set_border_width | ( | $val | ) |
set_color | ( | $colour | ) |
set_font_size | ( | $size | ) |
set_list_style | ( | $val | ) |
set_list_style_image | ( | $val | ) |
Sets the list style image
set_margin | ( | $val | ) |
set_margin_bottom | ( | $val | ) |
set_margin_left | ( | $val | ) |
set_margin_right | ( | $val | ) |
set_margin_top | ( | $val | ) |
#- #+ Sets the margin size
set_padding | ( | $val | ) |
set_padding_bottom | ( | $val | ) |
set_padding_left | ( | $val | ) |
set_padding_right | ( | $val | ) |
set_padding_top | ( | $val | ) |
#- #+ Sets the padding size
set_page_break_after | ( | $break | ) |
set_page_break_before | ( | $break | ) |
#+ Sets page break properties
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |