@@ 114-127 (lines=14) @@ | ||
111 | * |
|
112 | * @return array an array of all attributes with names matching $nameLike |
|
113 | */ |
|
114 | public function getAllLike($nameLike = null) |
|
115 | { |
|
116 | if ($nameLike === null) { |
|
117 | return $this->getArrayCopy(); |
|
118 | } |
|
119 | ||
120 | $likeSet = array(); |
|
121 | foreach ($this as $k => $v) { |
|
122 | if (mb_substr($k, 0, mb_strlen($nameLike))==$nameLike) { |
|
123 | $likeSet[$k]=$v; |
|
124 | } |
|
125 | } |
|
126 | return $likeSet; |
|
127 | } |
|
128 | } |
|
129 |
@@ 304-317 (lines=14) @@ | ||
301 | * |
|
302 | * @return array an array of all attributes with names matching $nameLike |
|
303 | */ |
|
304 | public function getAllLike($nameLike = null) |
|
305 | { |
|
306 | if ($nameLike === null) { |
|
307 | return $this->getArrayCopy(); |
|
308 | } |
|
309 | ||
310 | $likeSet = array(); |
|
311 | foreach ($this as $k => $v) { |
|
312 | if (substr($k, 0, strlen($nameLike))==$nameLike) { |
|
313 | $likeSet[$k]=$v; |
|
314 | } |
|
315 | } |
|
316 | return $likeSet; |
|
317 | } |
|
318 | } |
|
319 |