. /** * Contains the favourites_repository interface. * * @package core_favourites * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace core_favourites\local\repository; defined('MOODLE_INTERNAL') || die(); /** * The favourites_repository interface, defining additional operations useful to favourites type repositories. * * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ interface ifavourites_repository extends crud_repository { /** * Find a single favourite, based on it's unique identifiers. * * @param int $userid the id of the user to which the favourite belongs. * @param string $component the frankenstyle component name. * @param string $itemtype the type of the favourited item. * @param int $itemid the id of the item which was favourited (not the favourite's id). * @param int $contextid the contextid of the item which was favourited. * @return \stdClass the favourite. */ public function find_favourite(int $userid, string $component, string $itemtype, int $itemid, int $contextid) : \stdClass; }