Refactor Controller.php to use generic method instead of specific for generic view property setting