Total Complexity | 5 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
23 | class Style extends \ArrayIterator |
||
24 | { |
||
25 | /** |
||
26 | * Style::import |
||
27 | * |
||
28 | * @param \O2System\Html\Dom\Style $style |
||
29 | */ |
||
30 | public function import(Style $style) |
||
31 | { |
||
32 | foreach ($style->getArrayCopy() as $styleTextContent) { |
||
33 | $this->append($styleTextContent); |
||
34 | } |
||
35 | } |
||
36 | |||
37 | // ------------------------------------------------------------------------ |
||
38 | |||
39 | /** |
||
40 | * Style::offsetSet |
||
41 | * |
||
42 | * @param string $offset |
||
43 | * @param string $value |
||
44 | */ |
||
45 | public function offsetSet($offset, $value) |
||
46 | { |
||
47 | $value = trim($value); |
||
48 | |||
49 | if ( ! empty($value)) { |
||
50 | parent::offsetSet($offset, $value); |
||
51 | } |
||
52 | } |
||
53 | |||
54 | // ------------------------------------------------------------------------ |
||
55 | |||
56 | /** |
||
57 | * Style::__toString |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function __toString() |
||
64 | } |
||
65 | } |