public function loadState($state) { $this->clear(); if ($state !== null) { $this->copyFrom($state); } }