NewslettersRecipients.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. *
  4. * PHP Pro Bid $Id$ c3gtR0nZ87MEpolQ3ib5mkAKmhQEwBc4BWpzQOhDnuF/zdvoA4ImlSkW8rjG9fJOwSmRzljRHHkuTlsdfwkkdA==
  5. *
  6. * @link http://www.phpprobid.com
  7. * @copyright Copyright (c) 2014 Online Ventures Software LTD & CodeCube SRL
  8. * @license http://www.phpprobid.com/license Commercial License
  9. *
  10. * @version 7.0
  11. */
  12. /**
  13. * newsletters recipients table service class
  14. */
  15. namespace Ppb\Service;
  16. use Ppb\Db\Table\NewslettersRecipients as NewslettersRecipientsTable;
  17. class NewslettersRecipients extends AbstractService
  18. {
  19. /**
  20. *
  21. * class constructor
  22. */
  23. public function __construct()
  24. {
  25. parent::__construct();
  26. $this->setTable(
  27. new NewslettersRecipientsTable());
  28. }
  29. /**
  30. *
  31. * delete multiple recipients from the table
  32. *
  33. * @param array $ids the ids of the rows to be deleted
  34. * @return int returns the number of affected rows
  35. */
  36. public function delete(array $ids)
  37. {
  38. $adapter = $this->_table->getAdapter();
  39. $where[] = $adapter->quoteInto('id IN (?)', $ids);
  40. return $this->_table->delete($where);
  41. }
  42. }