Class ExampleVendorModel
Class Model acts as a stepping stone (or "intermediate agent") between the user-defined code (/src/models/) and the system-defined code (ParentModel) that helps to better structure the code. See @example
- Core\ParentModel
-
Model
-
Vendor\ExampleVendor\ExampleVendorModel
Namespace: Vendor\ExampleVendor
Example:
Located at src/vendor/ExampleVendor/models/ExampleVendorModel.php
Example:
// To avoid: FooController->queryProducts(); // and BarController->queryProducts(); // to be defined twice (one in each controller) or once (in ParentController, bad code practices) Controller->queryProducts(); // can be defined and thus accessed from both <b>Foo</b> and <b>Bar</b> Controllers.
Located at src/vendor/ExampleVendor/models/ExampleVendorModel.php
public static
|
|
public
|
|
public
|
getRow(),
query(),
queryClass(),
queryIndexed(),
updateRow()
|
$config,
$db,
$id
|