Function __global->table_row_to_portable_row

Definitions

sources/resource_fs.php

  • Make a table row a portable row.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$row array No No required parameter N/A N/A Table row
$db_fields array No No required parameter N/A N/A A map of DB-style schema data for the fields we have in $row; helps us build portability
$relation_map array No No required parameter N/A N/A Relation map
$db ?object No No Null N/A N/A Database connector to look up from (null: main site DB)

Returns

  • Portable row
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Make a table row a portable row.
 *
 * @param  array $row Table row
 * @param  array $db_fields A map of DB-style schema data for the fields we have in $row; helps us build portability
 * @param  array $relation_map Relation map
 * @param  ?object $db Database connector to look up from (null: main site DB)
 * @return array Portable row
 */

function table_row_to_portable_row(array $row, array $db_fields, array $relation_map, ?object $db = null) : array