private function getValue($value, $escaped) { $this->value = DataValueFactory::getInstance()->newDataValueByProperty($this->property->getDataItem()); $value = $this->unescape($value, $escaped); $this->value->setUserValue($value); return $this->value->isValid() ? $this->value->getWikiValue() : $value; }