protected function getSerializer() { if ($this->serializer === null) { $this->serializer = new Serializer(); } return $this->serializer; }