Example #1
0
 /**
  * @param Snak a snak with the same property
  * @throw Exception
  */
 public function setMainSnak(Snak $snak)
 {
     if (!$this->mainSnak->getPropertyID()->equals($snak->getPropertyID())) {
         throw new Exception('Different property id!');
     }
     $this->mainSnak = $snak;
     $this->changes['mainsnak'] = $snak->toArray();
 }