/**
 * Gets a row of data from a table
 *
 * @param   TableInterface  $table  Table instance for a row.
 *
 * @return  array  Associative array of all columns and values for a row in a table.
 *
 * @since   3.2
 */
public function getRowData(TableInterface $table)
{
    $fields = $table->getFields();
    $data = array();
    foreach ($fields as &$field) {
        $columnName = $field->Field;
        $value = $table->{$columnName};
        $data[$columnName] = $value;
    }
    return $data;
}