2017-08-22 10:53:26 +03:00
|
|
|
import Evented from '@ember/object/evented';
|
|
|
|
import Service from '@ember/service';
|
2022-02-03 01:11:11 +03:00
|
|
|
import classic from 'ember-classic-decorator';
|
2016-08-17 18:01:46 +03:00
|
|
|
|
2022-02-03 01:11:11 +03:00
|
|
|
@classic
|
|
|
|
export default class EventBusService extends Service.extend(Evented) {
|
2016-08-17 18:01:46 +03:00
|
|
|
publish() {
|
|
|
|
return this.trigger(...arguments);
|
2022-02-03 01:11:11 +03:00
|
|
|
}
|
|
|
|
|
2016-08-17 18:01:46 +03:00
|
|
|
subscribe() {
|
|
|
|
return this.on(...arguments);
|
2022-02-03 01:11:11 +03:00
|
|
|
}
|
|
|
|
|
2016-08-17 18:01:46 +03:00
|
|
|
unsubscribe() {
|
|
|
|
return this.off(...arguments);
|
|
|
|
}
|
2022-02-03 01:11:11 +03:00
|
|
|
}
|