Skip to content

Commit

Permalink
Update ActiveRecord.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinevia authored Jun 13, 2019
1 parent 3db7c56 commit 35e2e02
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public static function find($key)
return $o;
}

/**
* Inserts the record
* @return boolean
*/
protected function insert()
{
$db = static::getDatabase();
Expand All @@ -90,6 +94,10 @@ protected function insert()
return true;
}

/**
* Updates the record
* @return boolean
*/
protected function update()
{
$keys = $this->getKeys();
Expand Down Expand Up @@ -120,6 +128,10 @@ public function delete()
return $db->delete();
}

/**
* Saves the record
* @return boolean
*/
public function save()
{
if (count($this->data_changed) == count($this->data)) {
Expand Down

0 comments on commit 35e2e02

Please sign in to comment.