public function oneToManyThrough($model, $through, $relatedKey = null, $localKey = null)
	{
		// Format the model name and instantiate new object
		$related = $this->resolve($model);
		$through = $this->resolve($through);

		// Keys 
		$localKey   = $localKey   ?: strtolower($this->getModelName()) . '_id';
		$relatedKey = $relatedKey ?: strtolower($through->getModelName()) . '_id';

		return new OneToManyThrough($this, $related, $through->getTableName(), $localKey, $relatedKey);
	}
public function oneToManyThrough($model, $through, $relatedKey = null, $localKey = null)
	{
		// Format the model name and instantiate new object
		$related = $this->resolve($model);
		$through = $this->resolve($through);

		// Keys 
		$localKey   = $localKey   ?: strtolower($this->getModelName()) . '_id';
		$relatedKey = $relatedKey ?: strtolower($through->getModelName()) . '_id';

		return new OneToManyThrough($this, $related, $through->getTableName(), $localKey, $relatedKey);
	}
public function oneToManyThrough ( $ model , $ through , $ relatedKey = null , $ localKey = null ) { // Format the model name and instantiate new object $ related = $ this -> resolve ( $ model ) ; $ through = $ this -> resolve ( $ through ) ; // Keys  $ localKey = $ localKey ? : strtolower ( $ this -> getModelName ( ) ) . '_id' ; $ relatedKey = $ relatedKey ? : strtolower ( $ through -> getModelName ( ) ) . '_id' ; return new OneToManyThrough ( $ this , $ related , $ through -> getTableName ( ) , $ localKey , $ relatedKey ) ; }
Retrieves a one to many through model relationship

Note that here, versus the manyToMany relationship, we assume the 'through' item
actually has a formal model for it, rather than just an intermediate table name.

@param   string       $model       The name of the related model to associate to the current one
@param   string       $through     The name of the intermediate model
@param   string|null  $relatedKey  The related key used to associate the model to its parent
@param   string|null  $localKey    The local key used to associate the many back to the model
@return  \Hubzero\Database\Relationship\OneToManyThrough
@since   2.0.0
Retrieves a one to many through model relationship