Ejemplo n.º 1
0
 function deleteAdminValues()
 {
     $a = new Dase_DBO_Attribute($this->db);
     $a->collection_id = 0;
     foreach ($a->find() as $aa) {
         $v = new Dase_DBO_Value($this->db);
         $v->item_id = $this->id;
         $v->attribute_id = $aa->id;
         foreach ($v->find() as $doomed) {
             $doomed->delete();
         }
     }
     return "deleted admin metadata for " . $this->serial_number . "\n";
 }
Ejemplo n.º 2
0
 public function getItemsByAttAsAtom($attribute_ascii_id, $app_root)
 {
     $feed = $this->getBaseAtomFeed($app_root);
     $feed->setFeedType('items');
     $att = Dase_DBO_Attribute::get($this->db, $this->ascii_id, $attribute_ascii_id);
     $vals = new Dase_DBO_Value($this->db);
     $vals->attribute_id = $att->id;
     foreach ($vals->find() as $val) {
         $item = new Dase_DBO_Item($this->db);
         $item->load($val->item_id);
         //use cached ???
         $entry = $item->injectAtomEntryData($feed->addEntry(), $app_root);
         $entry->setSummary($item->getValue($attribute_ascii_id));
     }
     return $feed->asXML($app_root);
 }
Ejemplo n.º 3
0
 function getCurrentValues()
 {
     $current = array();
     $vals = new Dase_DBO_Value($this->db);
     $vals->attribute_id = $this->id;
     foreach ($vals->find() as $val) {
         $current[] = $val->value_text;
     }
     return $current;
 }