1 | <?php namespace Neomerx\JsonApi\Encoder\Parameters; |
||
25 | class SortParameter implements SortParameterInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $sortField; |
||
31 | |||
32 | /** |
||
33 | * @var bool |
||
34 | */ |
||
35 | private $isAscending; |
||
36 | |||
37 | /** |
||
38 | * @param string $sortField |
||
39 | * @param bool $isAscending |
||
40 | */ |
||
41 | 17 | public function __construct($sortField, $isAscending) |
|
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | 1 | public function __toString() |
|
59 | |||
60 | /** |
||
61 | * @inheritdoc |
||
62 | */ |
||
63 | 5 | public function getField() |
|
67 | |||
68 | /** |
||
69 | * @inheritdoc |
||
70 | */ |
||
71 | 3 | public function isAscending() |
|
75 | |||
76 | /** |
||
77 | * @inheritdoc |
||
78 | */ |
||
79 | 2 | public function isDescending() |
|
83 | } |
||
84 |