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

declare(strict_types=1);

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

interface CourseProviderInterface
{
Tobias Gross-Vogt's avatar
Tobias Gross-Vogt committed
     * @param array $options Available options:
     *                       * 'lang' ('de' or 'en')
     *                       * 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:
     *                       * 'lang' ('de' or 'en')
     *                       * Course::SEARCH_PARAMETER_NAME (partial, case-insensitive text search on 'name' attribute)
     *                       * LocalData::INCLUDE_PARAMETER_NAME
     *                       * LocalData::QUERY_PARAMETER_NAME
     *
    public function getCourses(array $options = []): Paginator;
Tobias Gross-Vogt's avatar
Tobias Gross-Vogt committed
     * @param array $options Available options:
     *                       * 'lang' ('de' or 'en')
     *
    public function getAttendeesByCourse(string $courseId, array $options = []): Paginator;