public function check($input) { foreach ($this->checks as $chk) { $chk->check($input); } if (count($parts = explode('.', $input)) >= 2) { $this->tld->check(array_pop($parts)); } foreach ($parts as $p) { $this->otherParts->check($p); } return true; }