Пример #1
0
 /**
  * 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;
 }
Пример #2
0
 /**
  * {@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();
 }
Пример #3
0
 /**
  * {@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;
 }
Пример #4
0
 /**
  * Disconnects from MySQL instance.
  */
 public function disconnect()
 {
     AuditDataLayer::disconnect();
 }