WebDriverResponse.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. // Copyright 2004-present Facebook. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. namespace Facebook\WebDriver\Remote;
  16. class WebDriverResponse
  17. {
  18. /**
  19. * @var int
  20. */
  21. private $status;
  22. /**
  23. * @var mixed
  24. */
  25. private $value;
  26. /**
  27. * @var string
  28. */
  29. private $sessionID;
  30. /**
  31. * @param null|string $session_id
  32. */
  33. public function __construct($session_id = null)
  34. {
  35. $this->sessionID = $session_id;
  36. }
  37. /**
  38. * @return null|int
  39. */
  40. public function getStatus()
  41. {
  42. return $this->status;
  43. }
  44. /**
  45. * @param int $status
  46. * @return WebDriverResponse
  47. */
  48. public function setStatus($status)
  49. {
  50. $this->status = $status;
  51. return $this;
  52. }
  53. /**
  54. * @return mixed
  55. */
  56. public function getValue()
  57. {
  58. return $this->value;
  59. }
  60. /**
  61. * @param mixed $value
  62. * @return WebDriverResponse
  63. */
  64. public function setValue($value)
  65. {
  66. $this->value = $value;
  67. return $this;
  68. }
  69. /**
  70. * @return null|string
  71. */
  72. public function getSessionID()
  73. {
  74. return $this->sessionID;
  75. }
  76. /**
  77. * @param mixed $session_id
  78. * @return WebDriverResponse
  79. */
  80. public function setSessionID($session_id)
  81. {
  82. $this->sessionID = $session_id;
  83. return $this;
  84. }
  85. }