public function initializeObject($initializationCause) { if ($initializationCause === ObjectManagerInterface::INITIALIZATIONCAUSE_RECREATED) { $this->protected = true; } }