- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
class someClass {
protected $map = array();
public function __construct(Array $data)
{
$this->map = $this->generateMap($data);
}
protected function generateMap(Array $data)
{
$map = array();
foreach ($data as $key => $value) {
...
$map[$otherSomeKey] = $otherSomeValue;
...
}
$this->map = $map;
}
}