| @@ 164-172 (lines=9) @@ | ||
| 161 | * |
|
| 162 | * @return string The primary key hash of the row |
|
| 163 | */ |
|
| 164 | public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) |
|
| 165 | { |
|
| 166 | // If the PK cannot be derived from the row, return NULL. |
|
| 167 | if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) { |
|
| 168 | return null; |
|
| 169 | } |
|
| 170 | ||
| 171 | return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * Retrieves the primary key from the DB resultset row |
|
| @@ 188-196 (lines=9) @@ | ||
| 185 | * |
|
| 186 | * @return string The primary key hash of the row |
|
| 187 | */ |
|
| 188 | public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) |
|
| 189 | { |
|
| 190 | // If the PK cannot be derived from the row, return NULL. |
|
| 191 | if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) { |
|
| 192 | return null; |
|
| 193 | } |
|
| 194 | ||
| 195 | return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; |
|
| 196 | } |
|
| 197 | ||
| 198 | /** |
|
| 199 | * Retrieves the primary key from the DB resultset row |
|