/** * Store a value for a given property identified by its text label * (without namespace prefix). * * @param string $propertyName * @param SWLPropertyChange $change */ public function addPropertyChange($propertyName, SWLPropertyChange $change) { $propertyKey = smwfNormalTitleDBKey($propertyName); if (array_key_exists($propertyKey, $this->properties)) { $property = $this->properties[$propertyKey]; } else { if (self::$propertyPrefix == '') { global $wgContLang; self::$propertyPrefix = $wgContLang->getNsText(SMW_NS_PROPERTY) . ':'; } // explicitly use prefix to cope with things like [[Property:User:Stupid::somevalue]] $propertyDV = SMWPropertyValue::makeUserProperty(self::$propertyPrefix . $propertyName); if (!$propertyDV->isValid()) { // error, maybe illegal title text return; } $property = $propertyDV->getDataItem(); } $this->addPropertyObjectChange($property, $change); }