__construct
Build the box
params:
array(
'height' => 10,
'width' => 20,
'x' => 5,
'y' => 5,
'padding' => array('left'=>10, 'top'=>12)
);
void
__construct
([array $params = array()])
-
array
$params: box params
setPadding
set the padding property
$padding can be:
- numeric: all the elements of the $padding array take the value
- comma separated string: the elements take the value of each value in
the order top, right, bottom, left
- array of keys / values: for each element of the array, the element of the $padding array
width the key take the value
examples:
print_r($box->padding); // array('top'=>10, 'right'=>10, 'bottom'=>10, 'left'=>10);
print_r($box->padding); // array('top'=>4, 'right'=>5, 'bottom'=>1, 'left'=>10);
$box->padding =
'5, 10'; // the unspecified values take the last value
print_r($box->padding); // array('top'=>5, 'right'=>10, 'bottom'=>10, 'left'=>10);
$box->padding =
array('bottom'=>
12); // the unspecified values not change
print_r($box->padding); // array('top'=>5, 'right'=>10, 'bottom'=>12, 'left'=>10);
void
setPadding
(mixed $padding)
__get
mixed
__get
(string $property)
__set
mixed
__set
(string $property, mixed $value)
-
string
$property
-
mixed
$value