-
Notifications
You must be signed in to change notification settings - Fork 20
Query Is
Thomas Weinert edited this page Jul 12, 2018
·
2 revisions
FluentDOM\Query is(string $selector);
Checks the current selection against an expression and returns true, if at least one element of the selection fits the given expression.
$html = <<<HTML
<html>
<head>
<title>Examples: FluentDOM\Query::is()</title>
</head>
<body>
<form><input type="checkbox" /></form>
<div> </div>
</body>
</html>
HTML;
$fdQuery = FluentDOM($html, 'text/html');
var_dump(
$fdQuery
->find('//input[@type = "checkbox"]')
->parent()
->is('name() = "form"')
);
bool(true)
- Home
- Getting Started
- Tasks
- Plugins
- Functions
- Lists
- Creator (5.1)
- CSS Selectors
- Convertors
- Loaders
- Serializers (5.1)
- Transformers (5.1)
- Extended DOM
- XMLReader (6.1)
- XMLWriter (6.1)
- Interfaces