equal
deleted
inserted
replaced
271 public function setContributors($contributors) { |
271 public function setContributors($contributors) { |
272 $delta = $this->startDelta(); |
272 $delta = $this->startDelta(); |
273 //remove old, |
273 //remove old, |
274 foreach ($this->getContributors() as $contribDef) { |
274 foreach ($this->getContributors() as $contribDef) { |
275 $value = null; |
275 $value = null; |
276 if (is_null($contribDef['url'])) { |
276 if (empty($contribDef['url'])) { |
277 if(is_null($contribDef['nameLiteral'])) { |
277 if(empty($contribDef['nameLiteral'])) { |
278 $value = new Literal($contribDef['name']); |
278 $value = new Literal($contribDef['name']); |
279 } else { |
279 } else { |
280 $value = $contribDef['nameLiteral']; |
280 $value = $contribDef['nameLiteral']; |
281 } |
281 } |
282 } else { |
282 } else { |
287 } |
287 } |
288 |
288 |
289 //put new |
289 //put new |
290 foreach ($contributors as $newContribDef) { |
290 foreach ($contributors as $newContribDef) { |
291 $value = null; |
291 $value = null; |
292 if (is_null($newContribDef['url'])) { |
292 if (empty($newContribDef['url'])) { |
293 $value = new Literal($newContribDef['name'], "fr", null); |
293 $value = new Literal($newContribDef['name'], "fr", null); |
294 } else { |
294 } else { |
295 $value = new Resource($newContribDef['url']); |
295 $value = new Resource($newContribDef['url']); |
296 } |
296 } |
297 $this->getProvidedCHO()->add($newContribDef['role'], $value); |
297 $this->getProvidedCHO()->add($newContribDef['role'], $value); |