public function accept() { if ($this->hasChildren()) { return true; } if ($this->current()->getExtension() == 'sql') { return true; } return false; }