Added return values for models::save

This commit is contained in:
Marcin Kurczewski 2014-05-05 12:32:07 +02:00
parent 05a3cf927b
commit c64d97fae6
5 changed files with 10 additions and 1 deletions

View file

@ -39,6 +39,8 @@ class CommentModel extends AbstractCrudModel
Database::exec($stmt); Database::exec($stmt);
}); });
return $comment;
} }
public static function remove($comment) public static function remove($comment)

View file

@ -113,6 +113,8 @@ class PostModel extends AbstractCrudModel
Database::exec($stmt); Database::exec($stmt);
} }
}); });
return $post;
} }
public static function remove($post) public static function remove($post)

View file

@ -32,7 +32,8 @@ class TagModel extends AbstractCrudModel
Database::exec($stmt); Database::exec($stmt);
}); });
return $tag->id;
return $tag;
} }
public static function remove($tag) public static function remove($tag)

View file

@ -33,6 +33,8 @@ class TokenModel extends AbstractCrudModel
Database::exec($stmt); Database::exec($stmt);
}); });
return $token;
} }
public static function findByToken($key, $throw = true) public static function findByToken($key, $throw = true)

View file

@ -63,6 +63,8 @@ class UserModel extends AbstractCrudModel
Database::exec($stmt); Database::exec($stmt);
}); });
return $user;
} }
public static function remove($user) public static function remove($user)