public function applyStrategy($options, $context) {
		if ($context->type() !== 'read') {
			return;
		}

		$options += ['strategy' => 'joined'];
		if (!$model = $context->model()) {
			throw new ConfigException('The `\'with\'` option need a valid `\'model\'` option.');
		}

		$strategy = $options['strategy'];
		if (isset($this->_strategies[$strategy])) {
			$strategy = $this->_strategies[$strategy];
			$strategy($model, $context);
		} else {
			throw new QueryException("Undefined query strategy `{$strategy}`.");
		}
	}
public function applyStrategy($options, $context) {
		if ($context->type() !== 'read') {
			return;
		}

		$options += ['strategy' => 'joined'];
		if (!$model = $context->model()) {
			throw new ConfigException('The `\'with\'` option need a valid `\'model\'` option.');
		}

		$strategy = $options['strategy'];
		if (isset($this->_strategies[$strategy])) {
			$strategy = $this->_strategies[$strategy];
			$strategy($model, $context);
		} else {
			throw new QueryException("Undefined query strategy `{$strategy}`.");
		}
	}
public function applyStrategy ( $ options , $ context ) { if ( $ context -> type ( ) !== 'read' ) { return ; } $ options += [ 'strategy' => 'joined' ] ; if ( ! $ model = $ context -> model ( ) ) { throw new ConfigException ( 'The `\'with\'` option need a valid `\'model\'` option.' ) ; } $ strategy = $ options [ 'strategy' ] ; if ( isset ( $ this -> _strategies [ $ strategy ] ) ) { $ strategy = $ this -> _strategies [ $ strategy ] ; $ strategy ( $ model , $ context ) ; } else { throw new QueryException ( "Undefined query strategy `{$strategy}`." ) ; } }
Applying a strategy to a `lithium\data\model\Query` object

@param array $options The option array
@param object $context A find query object to configure
Applying a strategy to a lithium \ data \ model \ Query object