WebDriverCommand.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 WebDriverCommand
  17. {
  18. /** @var string */
  19. private $sessionID;
  20. /** @var string */
  21. private $name;
  22. /** @var array */
  23. private $parameters;
  24. /**
  25. * @param string $session_id
  26. * @param string $name Constant from DriverCommand
  27. * @param array $parameters Array of
  28. */
  29. public function __construct($session_id, $name, $parameters)
  30. {
  31. $this->sessionID = $session_id;
  32. $this->name = $name;
  33. $this->parameters = $parameters;
  34. }
  35. /**
  36. * @return string
  37. */
  38. public function getName()
  39. {
  40. return $this->name;
  41. }
  42. /**
  43. * @return string
  44. */
  45. public function getSessionID()
  46. {
  47. return $this->sessionID;
  48. }
  49. /**
  50. * @return array
  51. */
  52. public function getParameters()
  53. {
  54. return $this->parameters;
  55. }
  56. }