protected final function isDescendentOf($ancestor) { $control = $this; while ($control !== $ancestor && $control->_parent) { $control = $control->_parent; } return $control === $ancestor; }