This is a bit of a rabbit trail, but I have a quick question. I'm currently working on refactoring a fairly large OOP application into MVC/patterns. For the sake of simplicity, I'm spreading model and view classes across multiple files. Obviously, I only want to include the models and views the application will be using for any given request.

My question is: where's the best place to require_once() the models/views you need? Does it matter? Am I missing something in terms of the application design?

Here's what I'm thinking (ignore the hard-coded path):
PHP Code:
class IndexCommand extends BaseCommand {
    
        function 
execute() {

            require_once(
'../views/IndexView.php');    
            
$this->view = new IndexView();

        }

    } 
Just wanted to make sure that was a reasonable way to go about it. Thanks!