1 | <?php |
||
15 | class Row implements ArrayAccess |
||
16 | { |
||
17 | /** |
||
18 | * Данные строки |
||
19 | * @var array|ArrayAccess |
||
20 | */ |
||
21 | protected $data; |
||
22 | |||
23 | /** |
||
24 | * Опции строки |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $options; |
||
28 | |||
29 | /** |
||
30 | * @param array|ArrayAccess $data |
||
31 | * @param array $options |
||
32 | */ |
||
33 | public function __construct($data, array $options = []) |
||
38 | |||
39 | /** |
||
40 | * @return array|ArrayAccess |
||
41 | */ |
||
42 | public function getData() |
||
46 | |||
47 | /** |
||
48 | * @param array|ArrayAccess $data |
||
49 | * @return $this |
||
50 | */ |
||
51 | public function setData($data) |
||
56 | |||
57 | /** |
||
58 | * @return array |
||
59 | */ |
||
60 | public function getOptions() |
||
64 | |||
65 | /** |
||
66 | * @param array $options |
||
67 | * @return $this |
||
68 | */ |
||
69 | public function setOptions($options) |
||
74 | |||
75 | /** |
||
76 | * @param string $name |
||
77 | * @return mixed |
||
78 | * @throws Exception\InvalidArgumentException |
||
79 | * @throws Exception\RuntimeException |
||
80 | */ |
||
81 | public function get($name) |
||
85 | |||
86 | /** |
||
87 | * (PHP 5 >= 5.0.0)<br/> |
||
88 | * Whether a offset exists |
||
89 | * @link http://php.net/manual/en/arrayaccess.offsetexists.php |
||
90 | * @param mixed $offset <p> |
||
91 | * An offset to check for. |
||
92 | * </p> |
||
93 | * @return boolean true on success or false on failure. |
||
94 | * </p> |
||
95 | * <p> |
||
96 | * The return value will be casted to boolean if non-boolean was returned. |
||
97 | */ |
||
98 | public function offsetExists($offset) |
||
102 | |||
103 | /** |
||
104 | * (PHP 5 >= 5.0.0)<br/> |
||
105 | * Offset to retrieve |
||
106 | * @link http://php.net/manual/en/arrayaccess.offsetget.php |
||
107 | * @param mixed $offset <p> |
||
108 | * The offset to retrieve. |
||
109 | * </p> |
||
110 | * @return mixed Can return all value types. |
||
111 | * @throws Exception\InvalidArgumentException |
||
112 | * @throws Exception\RuntimeException |
||
113 | */ |
||
114 | public function offsetGet($offset) |
||
124 | |||
125 | /** |
||
126 | * (PHP 5 >= 5.0.0)<br/> |
||
127 | * Offset to set |
||
128 | * @link http://php.net/manual/en/arrayaccess.offsetset.php |
||
129 | * @param mixed $offset <p> |
||
130 | * The offset to assign the value to. |
||
131 | * </p> |
||
132 | * @param mixed $value <p> |
||
133 | * The value to set. |
||
134 | * </p> |
||
135 | * @return void |
||
136 | */ |
||
137 | public function offsetSet($offset, $value) |
||
141 | |||
142 | /** |
||
143 | * (PHP 5 >= 5.0.0)<br/> |
||
144 | * Offset to unset |
||
145 | * @link http://php.net/manual/en/arrayaccess.offsetunset.php |
||
146 | * @param mixed $offset <p> |
||
147 | * The offset to unset. |
||
148 | * </p> |
||
149 | * @return void |
||
150 | */ |
||
151 | public function offsetUnset($offset) |
||
155 | } |
||
|
|||
156 |
This check marks files that end in a newline character, i.e. an empy line.