getServer(); * * //You have many ways of accessing the same members: * $server->id; * $server->Id; * $server["id"]; * $server["ID"]; * ``` */ class Thrive_Dash_Api_Postmark_DynamicResponseModel extends Thrive_Dash_Api_Postmark_CaseInsensitiveArray { /** * Create a new DynamicResponseModel from an associative array. * * @param array $data The source associative array. */ function __construct( array $data ) { parent::__construct( $data ); } /** * Infrastructure. Get an element by name. * * @param mixed $name Name of element to get from the dynamic response model. */ public function __get( $name ) { $value = $this[ $name ]; // If there's a value and it's an array, // convert it to a dynamic response object, too. if ( $value != null && is_array( $value ) ) { $value = new Thrive_Dash_Api_Postmark_DynamicResponseModel( $value ); } return $value; } /** * Infrastructure. Allows indexer to return a DynamicResponseModel. */ public function offsetGet( $offset ) { $result = parent::offsetGet( $offset ); if ( $result != null && is_array( $result ) ) { $result = new Thrive_Dash_Api_Postmark_DynamicResponseModel( $result ); } return $result; } } ?>