I am a cakePHP newbie, who has just been assigned to work on an existing system built with cakePHP 1.3. As I get familiar with the project and it's contents their are snippets of code I don't quite understand. Again and again (usually in a controller file) I see these:
'$this->model'
'$this->Model'
'$this->{$this->model}'
Searching google, the cake docs, and stackoverflow has yet to reveal a concise explanation of what exactly these strings are referring to. Many of the controllers I am working with have more than one model with which they interact, how do I know which one these snippets are invoking?
For instance web_forms_controller.php has 3 models which go with it web_forms.php, web_forms_field.php, and web_forms_submission.php. I feel like I am missing something basic here, but RTM has yet to reveal the answer I am after.
So in the above instance I am guessing that '$this->model' and '$this->Model' seen in web_forms_controller.php refer to the web_forms.php model. What '$this->{$this->model}' is a reference to in this case I have no idea.