Source of file Converter.php
Size: 0,780 Bytes - Last Modified: 2018-11-03T09:50:48-04:00
G:/AdobeConnectClient/src/Converter/Converter.php
1234567891011121314151617181920212223242526272829 | <?php namespace AdobeConnectClient\Converter; use DomainException; use InvalidArgumentException; use AdobeConnectClient\Connection\ResponseInterface; abstract class Converter { /** * @param ResponseInterface $response * @throws DomainException if data type is not implemented * @throws InvalidArgumentException if data is invalid * @return array An associative array */ public static function convert(ResponseInterface $response) { $type = $response->getHeaderLine('Content-Type'); switch (mb_strtolower($type)) { case 'text/xml': return ConverterXML::convert($response); default: throw new DomainException('Type "' . $type . '" not implemented.'); } } } |