Нет описания

Form.php 1.1KB

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