mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 21:43:18 +00:00
35 lines
774 B
PHP
35 lines
774 B
PHP
<?php
|
|
|
|
namespace Alchemy\Phrasea\Application;
|
|
|
|
require_once __DIR__ . '/../../../PhraseanetWebTestCaseAbstract.class.inc';
|
|
require_once __DIR__ . '/ApiAbstract.inc';
|
|
|
|
use Silex\WebTestCase;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
class ApiYamlApplication extends ApiAbstract
|
|
{
|
|
|
|
public function getParameters(array $parameters = array())
|
|
{
|
|
return $parameters;
|
|
}
|
|
|
|
public function unserialize($data)
|
|
{
|
|
try {
|
|
$ret = \Symfony\Component\Yaml\Yaml::parse($data);
|
|
} catch (\Exception $e) {
|
|
$this->fail("Unable to parse data : \n" . $data . "\nexception : " . $e->getMessage() . "\n");
|
|
}
|
|
|
|
return $ret;
|
|
}
|
|
|
|
public function getAcceptMimeType()
|
|
{
|
|
return 'text/yaml';
|
|
}
|
|
}
|