Example #1
0
 /**
     @param $urn String urn of an OmekaItem
     @return $item OmekaItem||null
     This method obeys $dbUsage.
     In case of $dbUsage getItem doesn't trigger all items to be fetched.
 */
 public function getItem($urn)
 {
     if ($this->items === null) {
         if ($this->getDbUsage()) {
             return OmekaItem::getItemFromDb($urn);
         } else {
             $this->getItems();
         }
     }
     if (array_key_exists($urn, $this->items)) {
         return $this->items[$urn];
     }
     return null;
 }