public function allow_duplicates($allow = true) { $this->allow_duplicates = (bool) $allow; return $this; }