Skip to content
Snippets Groups Projects
CourseProviderInterface.php 1.49 KiB
Newer Older
<?php

declare(strict_types=1);

namespace Dbp\Relay\BaseCourseBundle\API;
use Dbp\Relay\BaseCourseBundle\Entity\Course;
use Dbp\Relay\BaseCourseBundle\Entity\CourseAttendee;
use Dbp\Relay\CoreBundle\Exception\ApiError;

interface CourseProviderInterface
{
Tobias Gross-Vogt's avatar
Tobias Gross-Vogt committed
     * @param array $options Available options:
     *                       * Locale::LANGUAGE_OPTION (language in ISO 639‑1 format)
Tobias Gross-Vogt's avatar
Tobias Gross-Vogt committed
     *                       * LocalData::INCLUDE_PARAMETER_NAME
     *
     * @throws ApiError
     */
    public function getCourseById(string $identifier, array $options = []): Course;
Tobias Gross-Vogt's avatar
Tobias Gross-Vogt committed
     * @param array $options Available options:
     *                       * Locale::LANGUAGE_OPTION (language in ISO 639‑1 format)
Tobias Gross-Vogt's avatar
Tobias Gross-Vogt committed
     *                       * Course::SEARCH_PARAMETER_NAME (partial, case-insensitive text search on 'name' attribute)
     *                       * LocalData::INCLUDE_PARAMETER_NAME
     *                       * LocalData::QUERY_PARAMETER_NAME
     *
    public function getCourses(int $currentPageNumber, int $maxNumItemsPerPage, array $options = []): array;
Tobias Gross-Vogt's avatar
Tobias Gross-Vogt committed
     * @param array $options Available options:
     *                       * Locale::LANGUAGE_OPTION (language in ISO 639‑1 format)
     *
     * @return CourseAttendee[]
Tobias Gross-Vogt's avatar
Tobias Gross-Vogt committed
     *
    public function getAttendeesByCourse(string $courseId, int $currentPageNumber, int $maxNumItemsPerPage, array $options = []): array;