TraversableObject.php

Same filename in other branches
  1. 8.9.x core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/TraversableObject.php
  2. 10 core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/TraversableObject.php
  3. 11.x core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/TraversableObject.php

Namespace

Drupal\jsonapi_test_data_type

File

core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/TraversableObject.php

View source
<?php

namespace Drupal\jsonapi_test_data_type;


/**
 * An object which implements \IteratorAggregate.
 */
class TraversableObject implements \IteratorAggregate {
    public $property = "value";
    
    /**
     * {@inheritdoc}
     */
    public function getIterator() {
        return new \ArrayIterator();
    }

}

Classes

Title Deprecated Summary
TraversableObject An object which implements \IteratorAggregate.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.