-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Improved docs for fetchModel()
#7799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
en/controllers.rst
Outdated
| ) | ||
| ->all(); | ||
|
|
||
| .. php:method:: fetchModel(string $alias, array $config = []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be the signature used in the examples.
| .. php:method:: fetchModel(string $alias, array $config = []) | ||
| The ``fetchModel()`` method is useful to load non ORM models or ORM tables that | ||
| are not the controller's default:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or ORM tables that are not the controller's default
This is the same definition as fetchTable() which is confusing. We should describe fetchModel() for just one use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well "non ORM models" is the different bit here. This method can fetch any type of model including tables, which is what you get if you don't specify the 2nd argument.
| .. php:method:: fetchModel(string $alias, array $config = []) | ||
| The ``fetchModel()`` method is useful to load non ORM models or ORM tables that | ||
| are not the controller's default:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well "non ORM models" is the different bit here. This method can fetch any type of model including tables, which is what you get if you don't specify the 2nd argument.
No description provided.