In PHP MVC, what are the recommended strategies for handling data loading functions within the Model to ensure proper separation of concerns?

To ensure proper separation of concerns in PHP MVC, it is recommended to keep data loading functions within the Model layer. This helps in maintaining a clear distinction between data manipulation and presentation logic. One strategy is to create separate methods within the Model for different types of data loading operations, such as fetching data from a database or external API.

class Model {
    public function fetchDataFromDatabase($query) {
        // Database connection and query execution logic
    }

    public function fetchDataFromAPI($url) {
        // API request and response handling logic
    }
}