Нет описания

SubscriberIP.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace MailPoet\Models;
  3. if (!defined('ABSPATH')) exit;
  4. /**
  5. * @deprecated This model is deprecated. Use MailPoet\Subscribers\SubscriberIPsRepository and respective Doctrine entities instead.
  6. * This class can be removed after 2021-10-07
  7. * @property string $ip
  8. */
  9. class SubscriberIP extends Model {
  10. public static $_table = MP_SUBSCRIBER_IPS_TABLE; // phpcs:ignore PSR2.Classes.PropertyDeclaration
  11. /**
  12. * @deprecated This is here for displaying the deprecation warning for properties.
  13. */
  14. public function __get($key) {
  15. self::deprecationError('property "' . $key . '"');
  16. return parent::__get($key);
  17. }
  18. /**
  19. * @deprecated This is here for displaying the deprecation warning for static calls.
  20. */
  21. public static function __callStatic($name, $arguments) {
  22. self::deprecationError($name);
  23. return parent::__callStatic($name, $arguments);
  24. }
  25. private static function deprecationError($methodName) {
  26. trigger_error('Calling ' . $methodName . ' is deprecated and will be removed. Use MailPoet\Subscribers\SubscriberIPsRepository and respective Doctrine entities instead.', E_USER_DEPRECATED);
  27. }
  28. }