Proxy.php 867 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Proxy connection interface
  4. *
  5. * @package Requests\Proxy
  6. * @since 1.6
  7. */
  8. namespace WpOrg\Requests;
  9. use WpOrg\Requests\Hooks;
  10. /**
  11. * Proxy connection interface
  12. *
  13. * Implement this interface to handle proxy settings and authentication
  14. *
  15. * Parameters should be passed via the constructor where possible, as this
  16. * makes it much easier for users to use your provider.
  17. *
  18. * @see \WpOrg\Requests\Hooks
  19. *
  20. * @package Requests\Proxy
  21. * @since 1.6
  22. */
  23. interface Proxy {
  24. /**
  25. * Register hooks as needed
  26. *
  27. * This method is called in {@see \WpOrg\Requests\Requests::request()} when the user
  28. * has set an instance as the 'auth' option. Use this callback to register all the
  29. * hooks you'll need.
  30. *
  31. * @see \WpOrg\Requests\Hooks::register()
  32. * @param \WpOrg\Requests\Hooks $hooks Hook system
  33. */
  34. public function register(Hooks $hooks);
  35. }