Example #1
0
 /**
  * Returns the last encoding error (if any).
  *
  * @return int
  *
  * @deprecated since version 2.5, to be removed in 3.0. JsonEncode throws exception if an error is found.
  */
 public function getLastEncodingError()
 {
     trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\\Component\\Serializer\\Encoder\\JsonEncode::encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED);
     return $this->encodingImpl->getLastError();
 }
Example #2
0
 /**
  * Returns the last encoding error (if any).
  *
  * @return int
  *
  * @deprecated since 2.5, JsonEncode throws exception if an error is found, will be removed in 3.0
  */
 public function getLastEncodingError()
 {
     return $this->encodingImpl->getLastError();
 }