lithium\data\model\Query::applyStrategy()

public method

Helper method used by export() which delegate the query generation to the data source.

Parameters

  • \lithium\data\Source $source

    Instance of the data source to use for conversion.

Source

	public function applyStrategy(Source $source) {
		if ($this->_built) {
			return;
		}
		$this->_built = true;
		if (!$this->_config['with']) {
			return;
		}
		$options = [];
		if (isset($this->_config['strategy'])) {
			$options['strategy'] = $this->_config['strategy'];
		}
		$source->applyStrategy($options, $this);
	}