Event.php 605 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/3/23
  6. * Time: 下午1:48
  7. */
  8. namespace common\event;
  9. use yii\base\Component;
  10. use Yii;
  11. class Event extends Component
  12. {
  13. const EVENT_EMAIL = 'send_email'; //发送邮件时间
  14. public function SendEmail($arr)
  15. {
  16. $Help = new \backend\base\Help(); //静态方法无需new
  17. $brr['path'] = 'http://ygadmin.yigouf.com/tinifyimg/sendemail';
  18. $brr['data'] = $arr;
  19. $this->on(self::EVENT_EMAIL,[$Help,'AjaxRequest'],$brr);
  20. $this->trigger(self::EVENT_EMAIL);
  21. }
  22. }