public function getSerializer()
    {
        if (! $this->serializer || ! ($this->serializer instanceof Serializer)) {
            $this->serializer = Serializer::getInstance();
        }

        return $this->serializer;
    }