Beispiel #1
0
 public function deleteCover(GHEADER_BOL_Cover $cover)
 {
     $coverPath = $this->getCoverPath($cover);
     $event = new OW_Event(GHEADER_BOL_Service::EVENT_REMOVE, array('groupId' => $cover->groupId, 'id' => $cover->id, 'file' => $cover->file, 'status' => $cover->status, 'path' => $coverPath, 'src' => $this->getCoverUrl($cover), 'data' => $cover->getSettings()));
     OW::getEventManager()->trigger($event);
     $this->coverDao->deleteById($cover->id);
     unlink($coverPath);
 }
Beispiel #2
0
 /**
  * Returns an instance of class (singleton pattern implementation).
  *
  * @return GHEADER_BOL_CoverDao
  */
 public static function getInstance()
 {
     if (self::$classInstance === null) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }