Skip to content

Nodes OnPrepareSelector

Thomas Weinert edited this page Jul 30, 2014 · 2 revisions

FluentDOM\Nodes::$onPrepareSelector

The FluentDOM\Nodes::$onPrepareSelector allows to define a function that is called whenever a selector is used. This allows to replace the default Xpath expressions with others - like CSS selectors. The function needs to convert the selector to an Xpath expression.

The FluentDOM::QueryCss() method uses this property to attach Carica PhpCss or Symfony Css-Selector to a FluentDOM\Query instance.

Clone this wiki locally