lithium\data\collection\MultiKeyRecordSet::to()

public method

Converts the data in the record set to a different format, i.e. an array.

Parameters

  • string $format
  • array $options

Returns

mixed

Source

	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);
	}