Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 325 Bytes

XmlTypeEncoder.md

File metadata and controls

15 lines (10 loc) · 325 Bytes

XmlTypeEncoder (alias for Jsonx)

<?php

use Chubbyphp\DecodeEncode\Encoder\XmlTypeEncoder;

$encoderType = new XmlTypeEncoder();

echo $encoderType->getContentType();
// 'application/xml'

echo $encoderType->encode(['name' => 'php']);
// '<json:object><json:string name="name">php</json:string></json:object>'