lithium\data\collection\MultiKeyRecordSet::to()
Overrides
lithium\util\Collection::to()
Converts the data in the record set to a different format, i.e. an array.
Parameters
-
string
$format
-
array
$options
Returns
mixedSource
public function to($format, array $options = []) {
$default = ['indexed' => true];
$options += $default;
$options['internal'] = !$options['indexed'];
unset($options['indexed']);
$this->offsetGet(null);
if (!$options['internal'] && !is_scalar(current($this->_index))) {
$options['internal'] = true;
}
return parent::to($format, $options);
}