post_id = $this->swiffer_post( "post_id", "int" ); if( $this->post_id < 1 ) RomhackPlazaFS::invalid_parameter_stop( "post_id", "POST" ); $this->custom_post_type = $this->swiffer_post( "post_type", "string" ); if( $this->custom_post_type === "" ) RomhackPlazaFS::invalid_parameter_stop( "post_type", "POST" ); } protected function process(): void { $data = Data::setup( $this->custom_post_type, $this->post_id ); $private = Data::setup( $this->custom_post_type, $this->post_id, flags: Data::F_PRIVATE_FILE ); $archived = Data::setup( $this->custom_post_type, $this->post_id, flags: Data::F_ARCHIVED_FILE ); $response = []; $response['files'] = $data->list_files( $this->custom_post_type, $this->post_id ); $response['private'] = $private->list_files( $this->custom_post_type, $this->post_id ); $response['archived'] = $archived->list_files( $this->custom_post_type, $this->post_id ); RomhackPlazaFS::success_response( $response ); } }