public function __construct ($configs) { parent::__construct($configs); if (isset($configs['direct'])) $this->direct = $configs['direct']; $map = isset($configs['map']) ? $configs['map'] : null; $map_parts = explode(' ', $map); $map = array(); foreach ($map_parts as $map_part) { $map_part = explode('=', $map_part, 2); $dstkey = isset($map_part[0]) ? trim($map_part[0]) : null; $srckey = isset($map_part[1]) ? trim($map_part[1]) : null; if (!is_null($srckey) && !is_null($dstkey)) $map[$dstkey] = $srckey; } $this->map = $map; }
public function __construct ($configs) { parent::__construct($configs); }