*/
class XPathExpr
{
- /**
- * @var string
- */
private $path;
-
- /**
- * @var string
- */
private $element;
-
- /**
- * @var string
- */
private $condition;
/**
*/
public function addCondition($condition)
{
- $this->condition = $this->condition ? sprintf('%s and (%s)', $this->condition, $condition) : $condition;
+ $this->condition = $this->condition ? sprintf('(%s) and (%s)', $this->condition, $condition) : $condition;
return $this;
}
*
* @return $this
*/
- public function join($combiner, XPathExpr $expr)
+ public function join($combiner, self $expr)
{
$path = $this->__toString().$combiner;