protected function childsByAttr($path, $attr, $val) { foreach ($this->_scandir($path) as $p) { if (($_p = $this->closestByAttr($p, $attr, $val)) != false) { return $_p; } } return false; }