MDL-63658 core_favourites: make favourite a first class object
authorJake Dallimore <jake@moodle.com>
Tue, 16 Oct 2018 09:32:37 +0000 (17:32 +0800)
committerJake Dallimore <jake@moodle.com>
Thu, 18 Oct 2018 00:22:07 +0000 (08:22 +0800)
commitcfaf86b059ca6054b3c4e35653816b9037a08fe4
tree5548491ee2f89d1e0183d89db409da6c129ae972
parent8ffbe9c1634ba832da9a812f7c67221ac83f5575
MDL-63658 core_favourites: make favourite a first class object

This patch adds several things:
- favourite entity class under local/entity
- refactoring of repository and service to use the new class instead
of stdClass.
- update repository unit tests to use the object instead of stdClass.
- update service_test so that the mock repo requires the object for
the add operation.
- remove unnecessary constructor from favourites_repository class.
favourites/classes/local/entity/favourite.php [new file with mode: 0644]
favourites/classes/local/repository/crud_repository.php
favourites/classes/local/repository/favourites_repository.php
favourites/classes/local/repository/ifavourites_repository.php
favourites/classes/local/service/user_favourites_service.php
favourites/classes/services.php
favourites/tests/repository_test.php
favourites/tests/service_test.php