public function getTitle()
 {
     if ($this->title != '') {
         return $this->title;
     }
     // get view class by type
     $strClass = $GLOBALS['WLV'][$this->type];
     if (!class_exists($strClass)) {
         return;
     }
     $strategy = new $strClass();
     $view = new WatchlistItemView($strategy);
     return $view->getTitle($this);
 }
Exemplo n.º 2
0
 public function downloadAll()
 {
     $strFile = 'download_' . $this->strHash;
     $objZip = new \ZipWriter('system/tmp/' . $strFile);
     while (list($id, $item) = each($this->arrItems)) {
         // get view class by type
         $strClass = $GLOBALS['WLV'][$item->type];
         if (!class_exists($strClass)) {
             continue;
         }
         $strategy = new $strClass();
         $view = new WatchlistItemView($strategy);
         $objZip = $view->generateArchiveOutput($item, $objZip);
     }
     $objZip->close();
     // Open the "save as …" dialogue
     $objFile = new \File('system/tmp/' . $strFile, true);
     $objFile->sendToBrowser($strFile . '.zip');
 }