You are here

public function Gardener::getSettings in Backup and migrate prune 7

Same name and namespace in other branches
  1. 7.2 class/Gardener.php \Gardener::getSettings()

Returns the settings for the gardener

Return value

Array containig the settings

2 calls to Gardener::getSettings()
Gardener::processPrune in class/Gardener.php
Tests if the file is elegible to be prunned and deletes it if necessary
Gardener::save in class/Gardener.php
Persist the settings for this gardener
1 method overrides Gardener::getSettings()
GardenerFake::getSettings in ./backup_migrate_prune.test
Overwrites getSettings to not to consult the DB

File

class/Gardener.php, line 282
Gardener class implementation file

Class

Gardener
Gardener class implementation

Code

public function getSettings() {

  // Get cached settings
  if (empty($this->settings)) {
    $settings = db_select('backup_migrate_gardener', 'bmg')
      ->fields('bmg', array(
      'settings',
    ))
      ->condition('bmg.gardener_id', $this
      ->getId())
      ->execute()
      ->fetchField();
    if (isset($settings)) {
      $this
        ->setSettings(unserialize($settings));
    }
  }
  return $this->settings;
}