Members.php 877 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. class Services_Twilio_Rest_Members
  3. extends Services_Twilio_ListResource
  4. {
  5. /**
  6. * Return the member at the front of the queue. Note that any operations
  7. * performed on the Member returned from this function will use the /Front
  8. * Uri, not the Member's CallSid.
  9. *
  10. * @return Services_Twilio_Rest_Member The member at the front of the queue
  11. */
  12. public function front() {
  13. return new $this->instance_name($this->client, $this->uri . '/Front');
  14. }
  15. /* Participants are identified by CallSid, not like ME123 */
  16. public function getObjectFromJson($params, $idParam = 'sid') {
  17. return parent::getObjectFromJson($params, 'call_sid');
  18. }
  19. public function getResourceName($camelized = false)
  20. {
  21. // The JSON property name is atypical.
  22. return $camelized ? 'Members' : 'queue_members';
  23. }
  24. }