/** * Import item data method * @param array $data item data * @return Item self item */ private function import($data) { $this->field = (string) $data[0]; $this->type = (int) $data[1]; $this->expiration = (int) $data[2]; if ($this->type == 5) { $this->Value = new stdClass(); foreach ($data[3] as $nodeKey => $nodeValue) { $Item = new Item($nodeValue[0]); $this->Value->{$nodeKey} = $Item->import($nodeValue); } } else { $this->Value = $data[3]; } return $this; }