1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace MovingImage\Client\VMPro\Entity; |
4
|
|
|
|
5
|
|
|
use MovingImage\VMProApiClient\Util\AccessorTrait; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* Class VideosRequestParameters. |
9
|
|
|
* |
10
|
|
|
* @method int getChannelId() |
11
|
|
|
* @method VideosRequestParameters setChannelId(int $channelId) |
12
|
|
|
* @method int getOffset() |
13
|
|
|
* @method VideosRequestParameters setOffset(int $offset) |
14
|
|
|
* @method int getLimit() |
15
|
|
|
* @method VideosRequestParameters setLimit(int $limit) |
16
|
|
|
* @method string getOrder() |
17
|
|
|
* @method string getOrderProperty() |
18
|
|
|
* @method VideosRequestParameters setOrderProperty(string $orderProperty) |
19
|
|
|
* @method string getSearchTerm() |
20
|
|
|
* @method VideosRequestParameters setSearchTerm(string $searchTerm) |
21
|
|
|
* @method bool isIncludeCustomMetadata() |
22
|
|
|
* @method VideosRequestParameters setIncludeCustomMetadata(bool $includeCustomMetadata) |
23
|
|
|
* @method string getCustomMetadataField() |
24
|
|
|
* @method VideosRequestParameters setCustomMetadataField(int $customMetadataField) |
25
|
|
|
* @method string getSearchInField() |
26
|
|
|
* @method VideosRequestParameters setSearchInField(string $searchInField) |
27
|
|
|
* @method string getPublicationState() |
28
|
|
|
* @method VideosRequestParameters setPublicationState(string $publicationState) |
29
|
|
|
* @method bool isIncludeKeywords() |
30
|
|
|
* @method VideosRequestParameters setIncludeKeywords(bool $includeKeywords) |
31
|
|
|
* |
32
|
|
|
* @author Omid Rad <[email protected]> |
33
|
|
|
*/ |
34
|
|
|
class VideosRequestParameters |
35
|
|
|
{ |
36
|
|
|
use AccessorTrait; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @param string $order |
40
|
|
|
* |
41
|
|
|
* @return VideosRequestParameters |
42
|
|
|
*/ |
43
|
|
|
public function setOrder($order) |
44
|
|
|
{ |
45
|
|
|
$pool = ['asc', 'desc']; |
46
|
|
|
|
47
|
|
|
// Silently ignore wrong values |
48
|
|
|
if (in_array($order, $pool)) { |
49
|
|
|
$this->container['order'] = $order; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
return $this; |
53
|
|
|
} |
54
|
|
|
} |
55
|
|
|
|