ruleset = new Ruleset(strict: true); $this->ruleset->GET([ (new Rules(WorkTable::ID->value)) ->type(Type::STRING) ->min(1) ->max(parent::MYSQL_VARCHAR_MAX_LENGTH), (new Rules(WorkTable::TITLE->value)) ->type(Type::STRING) ->max(parent::MYSQL_VARCHAR_MAX_LENGTH), (new Rules(WorkTable::SUMMARY->value)) ->type(Type::STRING) ->max(parent::MYSQL_TEXT_MAX_LENGTH), (new Rules(WorkTable::IS_LISTED->value)) ->type(Type::BOOLEAN) ->default(true), (new Rules(WorkTable::DATE_MODIFIED->value)) ->type(Type::NUMBER) ->min(1) ->max(parent::MYSQL_INT_MAX_LENGTH), (new Rules(WorkTable::DATE_CREATED->value)) ->type(Type::NUMBER) ->min(1) ->max(parent::MYSQL_INT_MAX_LENGTH) ]); $ruleset->validate_or_exit(); parent::__construct(); } public function main(): Response { return $this->list(WorkTable::NAME, WorkTable::values()); } }