You are here

protected function DB::init in Anti Spam by CleanTalk 9.1.x

Same name in this branch
  1. 9.1.x src/lib/Cleantalk/Common/DB.php \Cleantalk\Common\DB::init()
  2. 9.1.x src/lib/Cleantalk/ApbctDrupal/DB.php \Cleantalk\ApbctDrupal\DB::init()
Same name and namespace in other branches
  1. 8.4 src/lib/Cleantalk/ApbctDrupal/DB.php \Cleantalk\ApbctDrupal\DB::init()

Alternative constructor. Initilize Database object and write it to property. Set tables prefix.

Overrides DB::init

File

src/lib/Cleantalk/ApbctDrupal/DB.php, line 11

Class

DB

Namespace

Cleantalk\ApbctDrupal

Code

protected function init() {
  $this->prefix = \Drupal::service('database')
    ->tablePrefix();
}