* zin: support to query root in commands.
This commit is contained in:
@@ -72,6 +72,11 @@ class query
|
||||
'commands' => $this->commands
|
||||
);
|
||||
}
|
||||
|
||||
public function isRoot(): bool
|
||||
{
|
||||
return count($this->selectors) === 1 && $this->selectors[0]->tag === 'root';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user