lib/Webforge/DOM/Query.php
public function setSelector($selector) {
    
    $this->literalSelector = $selector;

    $this->selector = $selector;
    $this->selector = str_replace(':first', ':nth-of-type(1)', $this->selector);
    // nth-of-type is a NOT nice alias for eq but its 1-based (eq ist 0-based)
    // but its not the same! fix me!
    $this->selector = Preg::replace_callback(
      $this->selector, 
      '/:eq\(([0-9]+)\)/', 
      function ($m) { 
        return sprintf(':nth-of-type(%d)', $m[1]+1); 
      }
    );
    return $this;
  }
public function setSelector($selector) {
    
    $this->literalSelector = $selector;

    $this->selector = $selector;
    $this->selector = str_replace(':first', ':nth-of-type(1)', $this->selector);
    // nth-of-type is a NOT nice alias for eq but its 1-based (eq ist 0-based)
    // but its not the same! fix me!
    $this->selector = Preg::replace_callback(
      $this->selector, 
      '/:eq\(([0-9]+)\)/', 
      function ($m) { 
        return sprintf(':nth-of-type(%d)', $m[1]+1); 
      }
    );
    return $this;
  }
public function setSelector ( $ selector ) { $ this -> literalSelector = $ selector ; $ this -> selector = $ selector ; $ this -> selector = str_replace ( ':first' , ':nth-of-type(1)' , $ this -> selector ) ; // nth-of-type is a NOT nice alias for eq but its 1-based (eq ist 0-based) // but its not the same! fix me! $ this -> selector = Preg :: replace_callback ( $ this -> selector , '/:eq\(([0-9]+)\)/' , function ( $ m ) { return sprintf ( ':nth-of-type(%d)' , $ m [ 1 ] + 1 ) ; } ) ; return $ this ; }
Sets and parses the selector

The result set is not re-callculated
Sets and parses the selector