class TraversableObject
Same name and namespace in other branches
- 10 core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/TraversableObject.php \Drupal\jsonapi_test_data_type\TraversableObject
- 9 core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/TraversableObject.php \Drupal\jsonapi_test_data_type\TraversableObject
- 8.9.x core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/TraversableObject.php \Drupal\jsonapi_test_data_type\TraversableObject
- main core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/TraversableObject.php \Drupal\jsonapi_test_data_type\TraversableObject
An object which implements \IteratorAggregate.
@implements \IteratorAggregate<int|string, mixed>
Hierarchy
- class \Drupal\jsonapi_test_data_type\TraversableObject implements \Drupal\jsonapi_test_data_type\IteratorAggregate
Expanded class hierarchy of TraversableObject
2 files declare their use of TraversableObject
- SerializerTest.php in core/
modules/ jsonapi/ tests/ src/ Kernel/ Serializer/ SerializerTest.php - TraversableObjectNormalizer.php in core/
modules/ jsonapi/ tests/ modules/ jsonapi_test_data_type/ src/ Normalizer/ TraversableObjectNormalizer.php
File
-
core/
modules/ jsonapi/ tests/ modules/ jsonapi_test_data_type/ src/ TraversableObject.php, line 12
Namespace
Drupal\jsonapi_test_data_typeView source
class TraversableObject implements \IteratorAggregate {
/**
* The test data.
*
* @var string
*/
public $property = "value";
/**
* Retrieves the iterator for the object.
*
* @return \ArrayIterator<int|string, mixed>
* The iterator.
*/
public function getIterator() : \ArrayIterator {
return new \ArrayIterator();
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary |
|---|---|---|---|
| TraversableObject::$property | public | property | The test data. |
| TraversableObject::getIterator | public | function | Retrieves the iterator for the object. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.