Media.php 949 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * A list of :class:`Media <Services_Twilio_Rest_MediaInstance>` objects.
  4. * For the definitive reference, see the `Twilio Media List Documentation
  5. * <https://www.twilio.com/docs/api/rest/media>`_.
  6. */
  7. class Services_Twilio_Rest_Media extends Services_Twilio_ListResource {
  8. // This is overridden because the list key in the Twilio response
  9. // is "media_list", not "media".
  10. public function getResourceName($camelized = false)
  11. {
  12. if ($camelized) {
  13. return "MediaList";
  14. } else {
  15. return "media_list";
  16. }
  17. }
  18. // We manually set the instance name here so that the parent
  19. // constructor doesn't attempt to figure out it. It would do it
  20. // incorrectly because we override getResourceName above.
  21. public function __construct($client, $uri) {
  22. $this->instance_name = "Services_Twilio_Rest_MediaInstance";
  23. parent::__construct($client, $uri);
  24. }
  25. }