You are here

public function Model::__construct in Little helpers 7.2

Same name and namespace in other branches
  1. 7 src/DB/Model.php \Drupal\little_helpers\DB\Model::__construct()

File

src/DB/Model.php, line 14

Class

Model

Namespace

Drupal\little_helpers\DB

Code

public function __construct($data = array(), $new = TRUE) {
  foreach ($data as $k => $v) {
    $this->{$k} = is_string($v) && !empty(static::$serialize[$k]) ? unserialize($v) : $v;
  }
  $this->new = $new;
}