src/Serializer/JmsSerializer.php
public function serialize($data, array $params = array())
    {
        return $this->jms->serialize(
            $data,
            self::SERIALIZER_FORMAT,
            $this->determineContext($this->jmsSerializeContext, $params)
        );
    }
public function serialize($data, array $params = array())
    {
        return $this->jms->serialize(
            $data,
            self::SERIALIZER_FORMAT,
            $this->determineContext($this->jmsSerializeContext, $params)
        );
    }
public function serialize ( $ data , array $ params = array ( ) ) { return $ this -> jms -> serialize ( $ data , self :: SERIALIZER_FORMAT , $ this -> determineContext ( $ this -> jmsSerializeContext , $ params ) ) ; }
Serializes given data to string

@param mixed $data
@param array $params

@return string
Serializes given data to string