for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace GFG\Mapper\Data\Type;
/**
* For option-like structures like:
*
* $data = [
* 'myOptions' => [1, 2, 3, 4]
* ];
* $structure = [
* 'myOptions' => [
* 'type' => 'option',
* 'prefix' => 'my_options'
* ]
*/
class Option extends Base
{
* {@inheritdoc}
public function run(&$data, $key = null)
foreach ($data as &$value) {
$value = $this->get($key ? "{$key}_{$value}" : $value);
}