PHPDaemon\XMLStream\XMLStreamObject::hasSub PHP Method

hasSub() public method

Has this XML Object the given sub?
public hasSub ( string $name, $ns = null ) : boolean
$name string
return boolean
    public function hasSub($name, $ns = null)
    {
        foreach ($this->subs as $sub) {
            if (($name === "*" or $sub->name === $name) and ($ns === null or $sub->ns === $ns)) {
                return true;
            }
        }
        return false;
    }