public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }
public function removeToplink($id) { $thistoplink = $this->getTopLinkById($id); $iconfile = $thistoplink->icon; if (preg_match('/^\\//', $iconfile)) { $avatarService = BOL_AvatarService::getInstance(); $avatarService->removeAvatarImage($avatarService->getAvatarsDir() . preg_replace('/^\\//', '', $iconfile)); } TOPLINK_BOL_ToplinkDao::getInstance()->deleteById($id); }