public to ( string $format, array $options = [] ) : mixed | ||
$format | string | By default the only supported value is `'array'`. However, additional format handlers can be registered using the `formats()` method. |
$options | array | Options for converting this collection: - `'internal'` _boolean_: Indicates whether the current internal representation of the collection should be exported. Defaults to `false`, which uses the standard iterator interfaces. This is useful for exporting record sets, where records are lazy-loaded, and the collection must be iterated in order to fetch all objects. - `'indexed'` _boolean|null_: Allows to control how converted data is keyed. When set to `true` will force indexed conversion of the collection (the default) even if the collection has a parent. When `false` will convert without indexing. Provide `null` as a value to this option to only index when the collection has no parent. |
리턴 | mixed | The object converted to the value specified in `$format`; usually an array or string. |