public function __construct($name, array $data) { $this->name = $name; if (isset($data[$name]['properties'])) { $data = $data[$name]['properties']; } $this->data = $data; }