TestEmail.php 530 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Mailer;
  3. use Cake\Mailer\Message;
  4. use Tools\Mailer\Email;
  5. /**
  6. * Help to test Email
  7. */
  8. class TestEmail extends Email {
  9. /**
  10. * Wrap to protected method
  11. *
  12. * @param string $text
  13. * @param int $length
  14. * @return array
  15. */
  16. public function wrap($text, $length = Message::LINE_LENGTH_MUST) {
  17. return parent::_wrap($text, $length);
  18. }
  19. /**
  20. * @param string $attribute
  21. * @return mixed
  22. */
  23. public function getProtected($attribute) {
  24. $attribute = '_' . $attribute;
  25. return $this->$attribute;
  26. }
  27. }