PHP Class Learner\Repositories\Eloquent\VideoRepository

Inheritance: extends AbstractRepository, implements Learner\Repositories\VideoRepositoryInterface
Afficher le fichier Open project: RryLee/learner.video

Protected Properties

Свойство Type Description
$relations array The user relate models.

Méthodes publiques

Méthode Description
__construct ( Video $video ) Create a new Video instance.
create ( array $data ) : array Create a video.
delete ( integer $id ) : boolean | null Delete video.
findAll ( ) : array Return id as key and title as value.
findAllPublishedPaginated ( integer $perPage = 50 ) : Illuminate\Contracts\Pagination\LengthAwarePaginator Paniaget the all videos.
getSaveForm ( ) : Learner\Services\Forms\CreateVideoFormService Create video save-form service.
hasChanged ( integer $id, string $resource_type, string $resource_id ) : boolean Check the video resource changed.
update ( integer $id, array $data ) : array Update video.

Method Details

__construct() public méthode

Create a new Video instance.
public __construct ( Video $video )
$video Learner\Models\Video

create() public méthode

Create a video.
public create ( array $data ) : array
$data array
Résultat array

delete() public méthode

Delete video.
public delete ( integer $id ) : boolean | null
$id integer
Résultat boolean | null

findAll() public méthode

Return id as key and title as value.
public findAll ( ) : array
Résultat array

findAllPublishedPaginated() public méthode

Paniaget the all videos.
public findAllPublishedPaginated ( integer $perPage = 50 ) : Illuminate\Contracts\Pagination\LengthAwarePaginator
$perPage integer
Résultat Illuminate\Contracts\Pagination\LengthAwarePaginator

getSaveForm() public méthode

Create video save-form service.
public getSaveForm ( ) : Learner\Services\Forms\CreateVideoFormService
Résultat Learner\Services\Forms\CreateVideoFormService

hasChanged() public méthode

Check the video resource changed.
public hasChanged ( integer $id, string $resource_type, string $resource_id ) : boolean
$id integer
$resource_type string
$resource_id string
Résultat boolean

update() public méthode

Update video.
public update ( integer $id, array $data ) : array
$id integer
$data array
Résultat array

Property Details

$relations protected_oe static_oe property

The user relate models.
protected static array $relations
Résultat array