I have read around the forums in many of the related posts and I have also read the documentation as best I can regarding this, but I think there's a bit of a "hole" in the logic I have now.
I have read all about making requests in HMVC and modules and have also read how to load models themselves. However, I can't find anything in the documentation about loading a model within a module.
I made a controller in the model and I used this code:
// Load a Module
\Module::load('website');
// Test load a model
$new = new Model_Page();
$new->active = '1';
$new->title = 'Test';
$new->save();
The model is in the same module and has the file name page.php
The model class is definitely Model_Page
The function that holds this code is definitely running
What am I missing?
Additional Information:
Version: 1.2 RC1
Packages: ORM, Auth
Error: ErrorException [ Error ]: Class 'Website\Model_Page' not found
The Answer
After scratching my head I realized that I had only defined the namespace on the Controller.
Once I declared the namespace on the model all fell into place.