method trigger documentation in bbn\Appui\Dbsync

Gets all information about a given table

function(array $cfg) { $cfg['run'] = 1; } if ( !isset($cfg['trig']) ){ $cfg['run'] = 1; } if (self::$disabled) { return $cfg; } self::firstCall(); if (self::check() && (count($cfg['tables']) === 1) && ($table = self::$db->tfn(current($cfg['tables']))) && \in_array($table, self::$tables, true) ){ if ( $cfg['moment'] === 'after' ){ // Case where we actually delete or restore through the $hcol column $values = []; if ( !empty($cfg['fields']) && !empty($cfg['values']) ){ foreach ( $cfg['fields'] as $i => $f ){ $values[$f] = $cfg['values'][$i]; } } self::$dbs->insert(self::$dbs_table, [ 'db' => self::$db->getCurrent(), 'tab' => self::$db->tsn($table), 'action' => $cfg['kind'], 'chrono' => microtime(true), 'rows' => empty($cfg['where']) ? '[]' : bbn\X::jsonBase64Encode($cfg['where']), 'vals' => empty($values) ? '[]' : bbn\X::jsonBase64Encode($values) ]); } } return $cfg; }

Gets all information about a given table BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.