public function assert($input) { if (!$this->validate($input)) { throw new ValidatorException(); } return true; }