mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
29 lines
589 B
PHP
29 lines
589 B
PHP
<?php
|
|
|
|
namespace Alchemy\Tests\Phrasea\Application;
|
|
|
|
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';
|
|
}
|
|
}
|