lib/db/cortex.php
function castField($key, $rel_depths=0) {
		if (!$key)
			return NULL;
		$mapper_arr = $this->get($key);
		if(!$mapper_arr)
			return NULL;
		$out = array();
		foreach ($mapper_arr as $mp)
			$out[] = $mp->cast(null,$rel_depths);
		return $out;
	}
function castField($key, $rel_depths=0) {
		if (!$key)
			return NULL;
		$mapper_arr = $this->get($key);
		if(!$mapper_arr)
			return NULL;
		$out = array();
		foreach ($mapper_arr as $mp)
			$out[] = $mp->cast(null,$rel_depths);
		return $out;
	}
function castField ( $ key , $ rel_depths = 0 ) { if ( ! $ key ) return NULL ; $ mapper_arr = $ this -> get ( $ key ) ; if ( ! $ mapper_arr ) return NULL ; $ out = array ( ) ; foreach ( $ mapper_arr as $ mp ) $ out [ ] = $ mp -> cast ( null , $ rel_depths ) ; return $ out ; }
cast a related collection of mappers
@param string $key field name
@param int $rel_depths  depths to resolve relations
@return array    array of associative arrays
cast a related collection of mappers