private function getPKValue($table, array $row, $quick = false) {
        if ($quick && isset($row[$table.'ID'])) {
            return [$table.'ID' => $row[$table.'ID']];
        }

        $tdef = $this->fetchTableDef($table);
        $cols = [];
        foreach ($tdef['columns'] as $name => $cdef) {
            if (empty($cdef['primary'])) {
                break;
            }
            if (!array_key_exists($name, $row)) {
                return null;
            }

            $cols[$name] = $row[$name];
        }
        return $cols;
    }
private function getPKValue($table, array $row, $quick = false) {
        if ($quick && isset($row[$table.'ID'])) {
            return [$table.'ID' => $row[$table.'ID']];
        }

        $tdef = $this->fetchTableDef($table);
        $cols = [];
        foreach ($tdef['columns'] as $name => $cdef) {
            if (empty($cdef['primary'])) {
                break;
            }
            if (!array_key_exists($name, $row)) {
                return null;
            }

            $cols[$name] = $row[$name];
        }
        return $cols;
    }
private function getPKValue ( $ table , array $ row , $ quick = false ) { if ( $ quick && isset ( $ row [ $ table . 'ID' ] ) ) { return [ $ table . 'ID' => $ row [ $ table . 'ID' ] ] ; } $ tdef = $ this -> fetchTableDef ( $ table ) ; $ cols = [ ] ; foreach ( $ tdef [ 'columns' ] as $ name => $ cdef ) { if ( empty ( $ cdef [ 'primary' ] ) ) { break ; } if ( ! array_key_exists ( $ name , $ row ) ) { return null ; } $ cols [ $ name ] = $ row [ $ name ] ; } return $ cols ; }
Get the primary or secondary keys from the given rows.

@param string $table The name of the table.
@param array $row The row to examine.
@param bool $quick Whether or not to quickly look for <tablename>ID for the primary key.
@return array|null Returns the primary keys and values from {@link $rows} or null if the primary key isn't found.
Get the primary or secondary keys from the given rows .