/** * Returns all triggers on a table. * * @param string $table_name The name of the table. * * @return \array[] */ private function getTableTriggers($table_name) { AuditDataLayer::disconnect(); AuditDataLayer::connect('localhost', 'test', 'test', self::$dataSchema); $triggers = AuditDataLayer::getTableTriggers(self::$dataSchema, $table_name); return $triggers; }
/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $this->io = new StratumStyle($input, $output); $this->configFileName = $input->getArgument('config file'); $this->readConfigFile(); // Create database connection with params from config file $this->connect($this->config); $this->dropTriggers(); // Drop database connection AuditDataLayer::disconnect(); $this->rewriteConfig(); }
/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $this->io = new StratumStyle($input, $output); $this->configFileName = $input->getArgument('config file'); $this->readConfigFile(); // Create database connection with params from config file $this->connect($this->config); $audit = new Audit($this->config, $this->configMetadata, $this->io); $status = $audit->main(); // Drop database connection AuditDataLayer::disconnect(); $this->rewriteConfig(); return $status; }
/** * Disconnects from MySQL instance. */ public function disconnect() { AuditDataLayer::disconnect(); }