Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Thomas Weinert
@ThomasWeinert
Hello, if you have a question about FluentDOM, please ask it. :-)
Paul Dufour
@pdufour
Hi
wondering if there is any way to do an each that returns a FluentDom element
$dom->find('div')->each(function($node) {
  $fluent_node = FluentDOM($node);
that is a pattern i've been repeating a bit
Thomas Weinert
@ThomasWeinert
No, like in jQuery it returns the node.
But it is an FluentDOM\Element by default, depending on what you do you might not need a full FluentDOM\Query object.
samayo
@samayo
does this library work with with plain html? I can't find any examples, the one you have are for xml only .. I think the documentation is really poor.
It would be nice to add more example, like how you can load a url and find a tag, or innerHTML of dom. ..
Thomas Weinert
@ThomasWeinert
Yes, FluentDOM can work with HTML.
samayo
@samayo
AH, still being turned away for a second time due to the poor documentation. It's all about parsing XML (which is dead easy) and creating/ouputing html content (which is rarely needed). Why couldn't you just have a simple example to fetch from a URL and output (echo not create HTML) a simple tag with class name.
That's what makes libraries like your important, parsing HTML. Not creating/parsing XML.
Anyway, take this as constructive advice.
Thomas Weinert
@ThomasWeinert
This message was deleted
Zain Ul Abidin
@zainulabidin302
any one here ?