I’ve spent the best part of the day working to a wrapper class to encapsulate, and hence save me some digits, the procedure of adding sections, settings and controls to the Theme Customization screen.
I’ve been successful so far for standard controls but the ones baked into WordPress (like image and file uploads) are still fugitive.
Standard controls work and current version, on GitHub, will allow adding a theme section with as little as
$this->themeSection = new \tad\wrappers\ThemeCustomizeSection('My section', 'As good a section as it can be', 'my_text_domain'); $this->themeSection->addSetting('some_text', 'Write something here', '', 'text');
and be done with it.