Adds 'ajax to the supported content types of the JSON encoder'
Expanded class hierarchy of JsonEncoder
class JsonEncoder extends BaseJsonEncoder implements EncoderInterface {
/**
* The formats that this Encoder supports.
*
* @var array
*/
protected static $format = array(
'json',
'ajax',
);
/**
* Overrides Symfony\Component\Serializer\Encoder\JsonEncoder::supportEncoding().
*/
public function supportsEncoding($format) {
return in_array($format, static::$format);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
JsonEncoder:: |
protected | property | ||
JsonEncoder:: |
protected | property | ||
JsonEncoder:: |
protected static | property | The formats that this Encoder supports. | |
JsonEncoder:: |
public | function |
Decodes a string into PHP data. Overrides DecoderInterface:: |
|
JsonEncoder:: |
public | function |
Encodes data into the given format Overrides EncoderInterface:: |
|
JsonEncoder:: |
constant | |||
JsonEncoder:: |
public | function | Returns the last decoding error (if any) | |
JsonEncoder:: |
public | function | Returns the last encoding error (if any) | |
JsonEncoder:: |
public | function |
Checks whether the deserializer can decode from given format. Overrides DecoderInterface:: |
1 |
JsonEncoder:: |
public | function |
Overrides Symfony\Component\Serializer\Encoder\JsonEncoder::supportEncoding(). Overrides JsonEncoder:: |
|
JsonEncoder:: |
public | function |