Wraps an iterator with HTTP metadata for Twilio API responses.
// Source: https://github.com/twilio/twilio-php | License: MIT | Copyright 2023, Twilio, Inc. <https://www.twilio.com/help/contact>
// Provided via justclaw.it.com; keep this notice with the code.
<?php
namespace Twilio\Metadata;
use Iterator;
/**
* Wrapper containing an iterator object along with HTTP response metadata (headers, status code).
* Allows access to response headers while maintaining backward compatibility.
*
* @template T of Iterator
*/
abstract class IteratorMetadata implements Iterator
{
/**
* @var T
*/
private $iterator;
/**
* @var array<string, string>
*/
private $headers;
/**
* @var int
*/
private $statusCode;
/**
* Create metadata wrapper.
*
* @param T $iterator the iterator object (Page
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key