Example #1
0
 public function logEnd(ForgeUpgrade_Bucket $bucket, $status)
 {
     $sth = $this->dbh->prepare('UPDATE ' . $this->t['bucket'] . ' SET status = ?, end_date = NOW() WHERE id = ?');
     if ($sth) {
         return $sth->execute(array($status, $bucket->getId()));
     }
     return false;
 }
 /**
  * Return a PDO logger appender that will reference the given bucket id
  *
  * @param ForgeUpgrade_Bucket $bucket The bucket
  *
  * @return LoggerAppenderPDO
  */
 public function getBucketLoggerAppender(ForgeUpgrade_Bucket $bucket)
 {
     $this->initOptions();
     $logger = new LoggerAppenderPDO();
     $logger->setUser($this->user);
     $logger->setPassword($this->password);
     $logger->setDSN($this->dsn);
     $logger->setTable('forge_upgrade_log');
     $logger->setInsertSql('INSERT INTO forge_upgrade_log (id, bucket_id, timestamp, logger, level, message, thread, file, line) VALUES (NULL,' . $bucket->getId() . ',?,?,?,?,?,?,?)');
     $logger->setInsertPattern('%d,%c,%p,%m,%t,%F,%L');
     $logger->activateOptions();
     return $logger;
 }
 /**
  * Add all available API to the given bucket
  * 
  * @param ForgeUpgrade_Bucket $bucket
  * 
  * @return void
  */
 protected function addBucketApis(ForgeUpgrade_Bucket $bucket)
 {
     $bucket->setAllApi($this->bucketApi);
 }
Example #4
0
 /**
  * Add all available API to the given bucket
  * 
  * @param ForgeUpgrade_Bucket $bucket
  * 
  * @return void
  */
 protected function addBucketApis(ForgeUpgrade_Bucket $bucket)
 {
     // Simple db api
     $bucket->setApi($this->bucketDb);
 }