FactoryInterface.php 763 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /*
  3. * This file is part of the php-phantomjs.
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. */
  8. namespace JonnyW\PhantomJs\Message;
  9. use JonnyW\PhantomJs\Message\RequestInterface;
  10. /**
  11. * PHP PhantomJs
  12. *
  13. * @author Jon Wenmoth <contact@jonnyw.me>
  14. */
  15. interface FactoryInterface
  16. {
  17. /**
  18. * Get singleton instance
  19. *
  20. * @return Factory
  21. */
  22. public static function getInstance();
  23. /**
  24. * Create request instance
  25. *
  26. * @param string $url
  27. * @param string $method
  28. * @return Request
  29. */
  30. public function createRequest($url, $method = RequestInterface::METHOD_GET);
  31. /**
  32. * Create response instance
  33. *
  34. * @return Response
  35. */
  36. public function createResponse();
  37. }