mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
32 lines
664 B
PHP
32 lines
664 B
PHP
<?php
|
|
|
|
namespace Nelmio\ApiDocBundle\Tests\Fixtures;
|
|
|
|
use FOS\RestBundle\Controller\Annotations\RequestParam;
|
|
|
|
/**
|
|
* For BC FOSRestBundle < 2.0
|
|
*
|
|
* @Annotation
|
|
* @Target("METHOD")
|
|
*
|
|
* @author Ener-Getick
|
|
*/
|
|
class RequestParamHelper extends RequestParam
|
|
{
|
|
public function __construct(array $data)
|
|
{
|
|
foreach ($data as $key => $value) {
|
|
if ($key === 'array') {
|
|
if (property_exists($this, 'map')) {
|
|
$this->map = $value;
|
|
} else {
|
|
$this->array = $value;
|
|
}
|
|
} else {
|
|
$this->$key = $value;
|
|
}
|
|
}
|
|
}
|
|
}
|