src/mako/database/midgard/Query.php
protected function parseIncludes()
	{
		$includes = ['this' => [], 'forward' => []];

		foreach($this->model->getIncludes() as $include => $criteria)
		{
			if(is_numeric($include))
			{
				$include  = $criteria;
				$criteria = null;
			}

			if(($position = strpos($include, '.')) === false)
			{
				$includes['this'][$include] = $criteria;
			}
			else
			{
				if($criteria === null)
				{
					$includes['forward'][substr($include, 0, $position)][] = substr($include, $position + 1);
				}
				else
				{
					$includes['forward'][substr($include, 0, $position)][substr($include, $position + 1)] = $criteria;
				}
			}
		}

		return $includes;
	}
protected function parseIncludes()
	{
		$includes = ['this' => [], 'forward' => []];

		foreach($this->model->getIncludes() as $include => $criteria)
		{
			if(is_numeric($include))
			{
				$include  = $criteria;
				$criteria = null;
			}

			if(($position = strpos($include, '.')) === false)
			{
				$includes['this'][$include] = $criteria;
			}
			else
			{
				if($criteria === null)
				{
					$includes['forward'][substr($include, 0, $position)][] = substr($include, $position + 1);
				}
				else
				{
					$includes['forward'][substr($include, 0, $position)][substr($include, $position + 1)] = $criteria;
				}
			}
		}

		return $includes;
	}
protected function parseIncludes ( ) { $ includes = [ 'this' => [ ] , 'forward' => [ ] ] ; foreach ( $ this -> model -> getIncludes ( ) as $ include => $ criteria ) { if ( is_numeric ( $ include ) ) { $ include = $ criteria ; $ criteria = null ; } if ( ( $ position = strpos ( $ include , '.' ) ) === false ) { $ includes [ 'this' ] [ $ include ] = $ criteria ; } else { if ( $ criteria === null ) { $ includes [ 'forward' ] [ substr ( $ include , 0 , $ position ) ] [ ] = substr ( $ include , $ position + 1 ) ; } else { $ includes [ 'forward' ] [ substr ( $ include , 0 , $ position ) ] [ substr ( $ include , $ position + 1 ) ] = $ criteria ; } } } return $ includes ; }
Parses includes.

@return array
Parses includes .