| 1 | <?php |
||
| 19 | class RestIncomingQueryParamContext |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var EEM_Base |
||
| 23 | */ |
||
| 24 | private $model; |
||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | private $requested_version; |
||
| 29 | /** |
||
| 30 | * @var boolean |
||
| 31 | */ |
||
| 32 | private $writing; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * RestIncomingQueryParamContext constructor. |
||
| 36 | * @param EEM_Base $model |
||
| 37 | * @param string $requested_version |
||
| 38 | * @param boolean $writing |
||
| 39 | */ |
||
| 40 | public function __construct(EEM_Base $model, $requested_version, $writing) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Gets the model currently being requested, eg class EEM_Event |
||
| 49 | * @since 4.9.72.p |
||
| 50 | * @return EEM_Base |
||
| 51 | */ |
||
| 52 | public function getModel() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Gets the version being requested, eg 4.8.36 |
||
| 59 | * @since 4.9.72.p |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | public function getRequestedVersion() |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Gets if the current request is for a writing request or just simple read |
||
| 69 | * @since 4.9.72.p |
||
| 70 | * @return bool |
||
| 71 | */ |
||
| 72 | public function isWriting() |
||
| 76 | } |
||
| 77 | // End of file RestIncomingQueryParamContext.php |
||
| 79 |