GravityPDF / querypath

A fork of QueryPath: a PHP library for HTML(5)/XML querying (CSS 4 or XPath) and processing (like jQuery) with PHP8.3 support
Other
21 stars 2 forks source link

Null arguments #10

Closed jakejackson1 closed 1 year ago

jakejackson1 commented 1 year ago

From querypath created by salarmehr: technosophos/querypath#179

Where for example $dom->text($text) is invoked while $text=null the method acts as a getter while it is not intended to be a setter (following jQuery). This is also true for attr('foo',null) and others. sending null and sending no parameter need to be distinguished. I think public function html($html = NULL) {} need to be converted to public function html() {} and the arguments fetched by func_get_args function.