@@ -24,23 +24,23 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | protected $databaseConnection; |
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * The id of the model. |
|
| 29 | - * |
|
| 30 | - * @property string $id |
|
| 31 | - */ |
|
| 32 | - |
|
| 33 | - /** |
|
| 34 | - * Create a model instance. |
|
| 35 | - */ |
|
| 36 | - public function __construct(DatabaseConnectionInterface $databaseConnection = null) |
|
| 37 | - { |
|
| 38 | - if ($databaseConnection == null) { |
|
| 39 | - $this->databaseConnection = DatabaseConnection::getInstance()->databaseConnection; |
|
| 40 | - } else { |
|
| 41 | - $this->databaseConnection = $databaseConnection; |
|
| 42 | - } |
|
| 43 | - } |
|
| 27 | + /** |
|
| 28 | + * The id of the model. |
|
| 29 | + * |
|
| 30 | + * @property string $id |
|
| 31 | + */ |
|
| 32 | + |
|
| 33 | + /** |
|
| 34 | + * Create a model instance. |
|
| 35 | + */ |
|
| 36 | + public function __construct(DatabaseConnectionInterface $databaseConnection = null) |
|
| 37 | + { |
|
| 38 | + if ($databaseConnection == null) { |
|
| 39 | + $this->databaseConnection = DatabaseConnection::getInstance()->databaseConnection; |
|
| 40 | + } else { |
|
| 41 | + $this->databaseConnection = $databaseConnection; |
|
| 42 | + } |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Sets into $properties the $key => $value pairs. |
@@ -65,23 +65,23 @@ discard block |
||
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - /** |
|
| 69 | - * Get all the model properties. |
|
| 70 | - * |
|
| 71 | - * @return array |
|
| 72 | - */ |
|
| 73 | - public function getProperties() |
|
| 74 | - { |
|
| 75 | - return $this->properties; |
|
| 76 | - } |
|
| 77 | - |
|
| 78 | - /** |
|
| 79 | - * Set model properties. |
|
| 80 | - */ |
|
| 81 | - public function setProperties(array $properties) |
|
| 82 | - { |
|
| 83 | - $this->properties = $properties; |
|
| 84 | - } |
|
| 68 | + /** |
|
| 69 | + * Get all the model properties. |
|
| 70 | + * |
|
| 71 | + * @return array |
|
| 72 | + */ |
|
| 73 | + public function getProperties() |
|
| 74 | + { |
|
| 75 | + return $this->properties; |
|
| 76 | + } |
|
| 77 | + |
|
| 78 | + /** |
|
| 79 | + * Set model properties. |
|
| 80 | + */ |
|
| 81 | + public function setProperties(array $properties) |
|
| 82 | + { |
|
| 83 | + $this->properties = $properties; |
|
| 84 | + } |
|
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * Pluralize the name of the child class. |