Skip to content

Commit 02c2b12

Browse files
committed
feat: elements class add htmlOuters function
1 parent fc8b701 commit 02c2b12

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Dom/Elements.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,19 @@ public function htmls()
218218
});
219219
}
220220

221+
/**
222+
* Gets the htmlOuter of all the elements
223+
*
224+
* @return \Illuminate\Support\Collection|\Tightenco\Collect\Support\Collection
225+
*/
226+
public function htmlOuters()
227+
{
228+
return $this->map(function($item){
229+
return trim($item->htmlOuter());
230+
});
231+
}
232+
233+
221234
/**
222235
* @return phpQueryObject
223236
*/

0 commit comments

Comments
 (0)