|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| Format ($index=0, $properties=array()) | |
| get_xf ($style) | |
| get_font () | |
| get_font_key () | |
| get_xf_index () | |
| _get_color ($name_color= '') | |
| set_align ($location) | |
| set_merge () | |
| set_bold ($weight=1) | |
| set_bottom ($style) | |
| set_top ($style) | |
| set_left ($style) | |
| set_right ($style) | |
| set_border ($style) | |
| set_border_color ($color) | |
| set_bottom_color ($color) | |
| set_top_color ($color) | |
| set_left_color ($color) | |
| set_right_color ($color) | |
| set_fg_color ($color) | |
| set_bg_color ($color) | |
| set_color ($color) | |
| set_pattern ($arg=1) | |
| set_underline ($underline) | |
| set_italic () | |
| set_size ($size) | |
| set_num_format ($num_format) | |
| set_text_wrap ($text_wrap=1) | |
Definition at line 42 of file Format.php.
| _get_color | ( | $ | name_color = '' | ) |
Used in conjunction with the set_xxx_color methods to convert a color string into a number. Color range is 0..63 but we will restrict it to 8..63 to comply with Gnumeric. Colors 0..7 are repeated in 8..15.
| string | $name_color | name of the color (i.e.: 'blue', 'red', etc..). Optional. |
Definition at line 270 of file Format.php.

Constructor
public
| integer | $index | the XF index for the format. |
| array | $properties | array with properties to be set on initialization. |
Definition at line 51 of file Format.php.
| get_font | ( | ) |
Generate an Excel BIFF FONT record.
Definition at line 196 of file Format.php.
| get_font_key | ( | ) |
Returns a unique hash key for a font. Used by Workbook->_store_all_fonts()
The elements that form the key are arranged to increase the probability of generating a unique key. Elements that hold a large range of numbers (eg. _color) are placed between two binary elements such as _italic
Definition at line 241 of file Format.php.
| get_xf | ( | $ | style | ) |
Generate an Excel BIFF XF record (style or cell).
| string | $style | The type of the XF record ('style' or 'cell'). |
Definition at line 112 of file Format.php.
| get_xf_index | ( | ) |
Returns the index used by Worksheet->_XF()
Definition at line 257 of file Format.php.
| set_align | ( | $ | location | ) |
Set cell alignment.
public
| string | $location | alignment for the cell ('left', 'right', etc...). |
Definition at line 328 of file Format.php.

| set_bg_color | ( | $ | color | ) |
Sets the cell's background color
public
| mixed | $color | either a string (like 'blue'), or an integer (like 0x41). |
Definition at line 552 of file Format.php.

| set_bold | ( | $ | weight = 1 | ) |
Bold has a range 0x64..0x3E8. 0x190 is normal. 0x2BC is bold.
public
| integer | $weight | Weight for the text, 0 maps to 0x190, 1 maps to 0x2BC. It's Optional, default is 1 (bold). |
Definition at line 384 of file Format.php.
| set_border | ( | $ | style | ) |
Set cells borders to the same style
public
| integer | $style | style to apply for all cell borders. 1 => thin, 2 => thick. |
Definition at line 457 of file Format.php.

| set_border_color | ( | $ | color | ) |
Sets all the cell's borders to the same color
public
| mixed | $color | The color we are setting. Either a string (like 'blue'), or an integer (like 0x41). |
Definition at line 477 of file Format.php.

| set_bottom | ( | $ | style | ) |
Sets the bottom border of the cell
public
| integer | $style | style of the cell border. 1 => thin, 2 => thick. |
Definition at line 412 of file Format.php.

| set_bottom_color | ( | $ | color | ) |
Sets the cell's bottom border color
public
| mixed | $color | either a string (like 'blue'), or an integer (range is [8...63]). |
Definition at line 491 of file Format.php.


| set_color | ( | $ | color | ) |
Sets the cell's color
public
| mixed | $color | either a string (like 'blue'), or an integer (like 0x41). |
Definition at line 564 of file Format.php.

| set_fg_color | ( | $ | color | ) |
Sets the cell's foreground color
public
| mixed | $color | either a string (like 'blue'), or an integer (like 0x41). |
Definition at line 540 of file Format.php.

| set_italic | ( | ) |
| set_left | ( | $ | style | ) |
Sets the left border of the cell
public
| integer | $style | style of the cell left border. 1 => thin, 2 => thick. |
Definition at line 434 of file Format.php.

| set_left_color | ( | $ | color | ) |
Sets the cell's left border color
public
| mixed | $color | either a string (like 'blue'), or an integer (like 0x41). |
Definition at line 515 of file Format.php.


| set_merge | ( | ) |
This is an alias for the unintuitive set_align('merge')
public
Definition at line 371 of file Format.php.

| set_num_format | ( | $ | num_format | ) |
Sets the num format
public
| integer | $num_format | The num format. |
Definition at line 620 of file Format.php.
| set_pattern | ( | $ | arg = 1 | ) |
Sets the pattern attribute of a cell
public
| integer | $arg | Optional. Defaults to 1. |
Definition at line 576 of file Format.php.
| set_right | ( | $ | style | ) |
Sets the right border of the cell
public
| integer | $style | style of the cell right border. 1 => thin, 2 => thick. |
Definition at line 445 of file Format.php.

| set_right_color | ( | $ | color | ) |
Sets the cell's right border color
public
| mixed | $color | either a string (like 'blue'), or an integer (like 0x41). |
Definition at line 527 of file Format.php.


| set_size | ( | $ | size | ) |
Sets the font size
public
| integer | $size | The font size (in pixels I think). |
Definition at line 609 of file Format.php.
| set_text_wrap | ( | $ | text_wrap = 1 | ) |
Sets text wrapping
public
| integer | $text_wrap | Optional. 0 => no text wrapping, 1 => text wrapping. Defaults to 1. |
Definition at line 632 of file Format.php.
| set_top | ( | $ | style | ) |
Sets the top border of the cell
public
| integer | $style | style of the cell top border. 1 => thin, 2 => thick. |
Definition at line 423 of file Format.php.

| set_top_color | ( | $ | color | ) |
Sets the cell's top border color
public
| mixed | $color | either a string (like 'blue'), or an integer (range is [8...63]). |
Definition at line 503 of file Format.php.


| set_underline | ( | $ | underline | ) |
Sets the underline of the text
public
| integer | $underline | The value for underline. Possible values are: 1 => underline, 2 => double underline. |
Definition at line 588 of file Format.php.