@return Serializer

@throws \Zend\ServiceManager\Exception\ServiceNotFoundException
@throws \Zend\ServiceManager\Exception\ServiceNotCreatedException
@throws \Zend\ServiceManager\Exception\RuntimeException
13536
public function getSerializer()
    {
        if ($this->serializer) {
            return $this->serializer;
        }

        $serializerName = $this->getSerializerName();
        /** @var Serializer $serializer */
        $serializer = $this->getSerializerManager()->get($serializerName);
        $this->serializer = $serializer;

        return $this->serializer;
    }
578845
protected function deserializer()
    {
        if (null === $this->deserializer) {
            $self = $this;
            $this->deserializer = Closure::bind($this->bindDeserializer(), null, $this->class);
        }
        return $this->deserializer;
    }
677578
public function getService()
    {
        if (null === $this->service) {
            $class = explode('\\', get_class($this));
            $class = substr(end($class), 0, -10);
            $serviceKey = strtolower($this->getModuleNamespace() . '_' . $class . '_service');
            $this->setService($this->getServiceLocator()->get($serviceKey));
        }
        return $this->service;
    }
1021228
public static function create($name)
    {
        $serializerClass = 'Dmishh\\SettingsBundle\\Serializer\\' . Container::camelize($name) . 'Serializer';

        if (class_exists($serializerClass)) {
            return new $serializerClass();
        } else {
            $serializerClass = $name;

            if (class_exists($serializerClass)) {
                $serializer = new $serializerClass();
                if ($serializer instanceof SerializerInterface) {
                    return $serializer;
                }
            }
        }

        throw new UnknownSerializerException($serializerClass);
    }
382498
public function jsonSerialize()
    {
        if (static::$serializer) {
            return call_user_func(static::$serializer, $this);
        }

        $carbon = $this;

        return call_user_func(function () use ($carbon) {
            return get_object_vars($carbon);
        });
    }
416347
public function getServiceLocator()
	{
		if (is_null($this->_serviceLocator))
			$this->_serviceLocator = new ServiceManager(new Config()); //ServiceLocatorFactory::getInstance();
		return $this->_serviceLocator;
	}
822715
public function get()
    {
        if (class_exists($this->serializerType)) {

            if (in_array('Mmoreram\\RSQueueBundle\\Serializer\\Interfaces\\SerializerInterface', class_implements($this->serializerType))) {
                return new $this->serializerType;
            } else {

                throw new SerializerNotImplementsInterfaceException;
            }
        }

        $composedSerializerNamespace = '\\Mmoreram\\RSQueueBundle\\Serializer\\' . $this->serializerType . 'Serializer';

        if (class_exists($composedSerializerNamespace)) {
            return new $composedSerializerNamespace;
        }

        throw new SerializerNotFoundException;
    }
570545
public function serialize()
    {
        return serialize(array(
            'records' => serialize($this->records),
            'done' => $this->done,
            'queryLocator' => serialize($this->queryLocator),
            'size' => $this->size
        ));
    }
747693
public static function createSerializer()
    {
        $encoders = array(new XmlEncoder(), new JsonEncoder(), new LtsvEncoder());
        $normalizers = array(new GetSetMethodNormalizer());

        return new Serializer($normalizers, $encoders);
    }
1370293
public function serializer($type = null)
    {
        $type = $type ?? 'php';

        if (isset($this->serializers[$type])) {
            return $this->serializers[$type];
        }

        return $this->serializers[$type] = $this->resolve($type);
    }
1226643
public function getSerializer()
    {
        if (! $this->serializer || ! ($this->serializer instanceof Serializer)) {
            $this->serializer = Serializer::getInstance();
        }

        return $this->serializer;
    }
1254737
public function load() : Persistable
    {
        $data = $this->connector->get($this->key) ?: '';

        $persistable = $this->serializer->unserialize($data);

        if (!$persistable instanceof Persistable) {
            throw new RuntimeException('Persistable could not be'
                . ' reconstituted.');
        }

        return $persistable;
    }
382870
public function serialize()
    {
        if ($this->getIsModified() || $this->getIsNew()) {
            throw new RuntimeException($this->translate(
                'Cannot serialize modified or new object.'
            ));
        }

        if ($this->collection && $this->type) {
            $this->fullyLoad(true);
        }
        $data = [
            $this->initialValues,
            $this->getCollectionName(),
            $this->getTypeName()
        ];

        return serialize($data);
    }
688907
public function serialize()
    {
        // Load all of the inputs.
        $this->loadAllInputs();

        // Remove $_ENV and $_SERVER from the inputs.
        $inputs = $this->inputs;
        unset($inputs['env']);
        unset($inputs['server']);

        // Serialize the executable, args, options, data, and inputs.
        return serialize([$this->calledScript, $this->args, $this->filter, $this->data, $inputs]);
    }
1124865
public function serialize()
    {
        $spec = array(
            '_aFeatures'      => $this->_aFeatures,
            '_aGroup'         => $this->_aGroup,
            '_browser'        => $this->_browser,
            '_browserVersion' => $this->_browserVersion,
            '_userAgent'      => $this->_userAgent,
            '_images'         => $this->_images,
        );
        return serialize($spec);
    }
434277
public function jsonSerialize()
    {
        $ret = new stdClass();
        $ret->code = $this->errorCode;
        $ret->message = $this->getUserMessage();

        return $ret;
    }
59848
public function serialize()
    {
        return serialize(array($this->name, $this->value, $this->code, $this->line));
    }