Example #1
0
 function __get($var)
 {
     //allows smarty to invoke function as if getter
     $classname = get_class($this);
     $method = 'get' . ucfirst($var);
     if (method_exists($classname, $method)) {
         return $this->{$method}();
     } else {
         return parent::__get($var);
     }
 }
Example #2
0
 public function getItemsMarkedToBeDeletedAtom($r)
 {
     $feed = new Dase_Atom_Feed();
     $feed->setTitle($this->collection->collection_name . ' items to be deleted');
     $feed->setId(Dase_Atom::getNewId());
     $items = new Dase_DBO_Item($this->db);
     $items->collection_id = $this->collection->id;
     $items->status = 'delete';
     foreach ($items->find() as $item) {
         $item = clone $item;
         $entry = $feed->addEntry();
         $entry->addLink($r->app_root . '/item/' . $this->collection->ascii_id . '/' . $item->serial_number, "http://daseproject.org/relation/search-item");
         $item->injectAtomEntryData($entry, $r->app_root);
     }
     $r->renderResponse($feed->asXml());
 }