BaseModel/Model Class Commetns

This commit is contained in:
Najdanović Ivan 2020-12-01 14:30:23 +01:00 committed by Najdanovic Ivan
parent 3bc0aba519
commit 885f39d804
No known key found for this signature in database
GPG Key ID: 749558EFC3CD9071
2 changed files with 11 additions and 13 deletions

View File

@ -28,17 +28,18 @@ use stdClass;
/**
* Class Model
*
* The Model class provides a number of convenient features that
* makes working with a database table less painful.
* The BaseModel class provides a number of convenient features that
* makes working with a databases less painful. Extending this class
* provide means of implementing various database systems
*
* It will:
* - automatically connect to database
* - allow intermingling calls between db connection, the builder,
* and methods in this class.
* - simplifies pagination
* - removes the need to use Result object directly in most cases
* - allow specifying the return type (array, object, etc) with each call
* - automatically set and update timestamps
* - handle soft deletes
* - ensure validation is run against objects when saving items
* - process various callbacks
* - allow intermingling calls to the db connection
*/
abstract class BaseModel
{

View File

@ -30,17 +30,14 @@ use ReflectionProperty;
/**
* Class Model
*
* The Model class provides a number of convenient features that
* makes working with a database table less painful.
* The Model class extends BaseModel and provides additional
* convenient features that makes working with a SQL database
* table less painful.
*
* It will:
* - automatically connect to database
* - allow intermingling calls between db connection, the builder,
* and methods in this class.
* - simplifies pagination
* - allow intermingling calls to the builder
* - removes the need to use Result object directly in most cases
* - allow specifying the return type (array, object, etc) with each call
* - ensure validation is run against objects when saving items
*
* @property ConnectionInterface $db
*