GetAllDataFromColumns() final public static method

Gets the data from the supplied columns from all of the supplied result rows NOTE: Keys are preserved.
final public static GetAllDataFromColumns ( array $ResultRows, array $Columns ) : ResultRow[]
$ResultRows array The result rows to get the data from
$Columns array The columns to get the from
return ResultRow[] The data of the supplied columns
Ejemplo n.º 1
0
 protected final function GroupRowsByColumnValues(array $ResultRows, array $Columns)
 {
     $GroupedRelatedRows = [];
     $GroupByKeys = Relational\ResultRow::GetAllDataFromColumns($ResultRows, $Columns);
     foreach ($ResultRows as $Key => $ResultRow) {
         $Hash = $GroupByKeys[$Key]->HashData();
         if (!isset($GroupedRelatedRows[$Hash])) {
             $GroupedRelatedRows[$Hash] = [];
         }
         $GroupedRelatedRows[$Hash][] = $ResultRow;
     }
     return $GroupedRelatedRows;
 }
Ejemplo n.º 2
0
 protected final function IndexRowsByHashedColumnValues(array $ResultRows, array $Columns)
 {
     $KeyedRows = [];
     $ColumnDataArray = Relational\ResultRow::GetAllDataFromColumns($ResultRows, $Columns);
     foreach ($ResultRows as $Key => $Row) {
         $Hash = $ColumnDataArray[$Key]->HashData();
         $KeyedRows[$Hash] = $Row;
     }
     return $KeyedRows;
 }