protected function getResultsByRelatedKey($relations)
	{
		$resultsByRelatedKey = [];

		foreach ($relations as $relation)
		{
			if (!isset($resultsByRelatedKey[$relation->{$this->associativeLocal}]))
			{
				$resultsByRelatedKey[$relation->{$this->associativeLocal}] = new Rows;
			}

			$resultsByRelatedKey[$relation->{$this->associativeLocal}]->push($relation);
		}

		return $resultsByRelatedKey;
	}
protected function getResultsByRelatedKey($relations)
	{
		$resultsByRelatedKey = [];

		foreach ($relations as $relation)
		{
			if (!isset($resultsByRelatedKey[$relation->{$this->associativeLocal}]))
			{
				$resultsByRelatedKey[$relation->{$this->associativeLocal}] = new Rows;
			}

			$resultsByRelatedKey[$relation->{$this->associativeLocal}]->push($relation);
		}

		return $resultsByRelatedKey;
	}
protected function getResultsByRelatedKey ( $ relations ) { $ resultsByRelatedKey = [ ] ; foreach ( $ relations as $ relation ) { if ( ! isset ( $ resultsByRelatedKey [ $ relation -> { $ this -> associativeLocal } ] ) ) { $ resultsByRelatedKey [ $ relation -> { $ this -> associativeLocal } ] = new Rows ; } $ resultsByRelatedKey [ $ relation -> { $ this -> associativeLocal } ] -> push ( $ relation ) ; } return $ resultsByRelatedKey ; }
Sorts the relations into arrays keyed by the related key

@param   array  $relations  The relations to sort
@return  array
@since   2.0.0
Sorts the relations into arrays keyed by the related key