public function setRestContent($data)
    {
        $serializer = $this->getSerializer();

        if (isset($data)) {
            $this->setContent($serializer->serialize($data, $this->format));
        }

        return $this;
    }
public function setRestContent($data)
    {
        $serializer = $this->getSerializer();

        if (isset($data)) {
            $this->setContent($serializer->serialize($data, $this->format));
        }

        return $this;
    }
public function setRestContent ( $ data ) { $ serializer = $ this -> getSerializer ( ) ; if ( isset ( $ data ) ) { $ this -> setContent ( $ serializer -> serialize ( $ data , $ this -> format ) ) ; } return $ this ; }
Set Content to be serialized in the response, array or object

@param array $data array or object to be serialized

@return $this
Set Content to be serialized in the response array or object