| @@ 491-502 (lines=12) @@ | ||
| 488 | * |
|
| 489 | * @throws FakeException |
|
| 490 | */ |
|
| 491 | private function parseGroupLink(IEvent &$event, Circle $circle, Member $group) { |
|
| 492 | if ($event->getSubject() !== 'group_link') { |
|
| 493 | return; |
|
| 494 | } |
|
| 495 | ||
| 496 | $this->parseCircleMemberEvent( |
|
| 497 | $event, $circle, $group, |
|
| 498 | $this->l10n->t('You linked {group} to {circle}'), |
|
| 499 | $this->l10n->t('{group} has been linked to {circle} by {author}') |
|
| 500 | ); |
|
| 501 | throw new FakeException(); |
|
| 502 | } |
|
| 503 | ||
| 504 | ||
| 505 | /** |
|
| @@ 512-523 (lines=12) @@ | ||
| 509 | * |
|
| 510 | * @throws FakeException |
|
| 511 | */ |
|
| 512 | private function parseGroupUnlink(IEvent &$event, Circle $circle, Member $group) { |
|
| 513 | if ($event->getSubject() !== 'group_unlink') { |
|
| 514 | return; |
|
| 515 | } |
|
| 516 | $this->parseCircleMemberEvent( |
|
| 517 | $event, $circle, $group, |
|
| 518 | $this->l10n->t('You unlinked {group} from {circle}'), |
|
| 519 | $this->l10n->t('{group} has been unlinked from {circle} by {author}') |
|
| 520 | ); |
|
| 521 | ||
| 522 | throw new FakeException(); |
|
| 523 | } |
|
| 524 | ||
| 525 | ||
| 526 | /** |
|
| @@ 558-571 (lines=14) @@ | ||
| 555 | * |
|
| 556 | * @throws FakeException |
|
| 557 | */ |
|
| 558 | private function parseMemberInvited(IEvent &$event, Circle $circle, Member $member) { |
|
| 559 | if ($event->getSubject() !== 'member_invited') { |
|
| 560 | return; |
|
| 561 | } |
|
| 562 | ||
| 563 | $this->parseCircleMemberAdvancedEvent( |
|
| 564 | $event, $circle, $member, |
|
| 565 | $this->l10n->t('You invited {member} to join {circle}'), |
|
| 566 | $this->l10n->t('You have been invited to join {circle} by {author}'), |
|
| 567 | $this->l10n->t('{member} has been invited to join {circle} by {author}') |
|
| 568 | ); |
|
| 569 | ||
| 570 | throw new FakeException(); |
|
| 571 | } |
|
| 572 | ||
| 573 | ||
| 574 | /** |
|
| @@ 605-617 (lines=13) @@ | ||
| 602 | * |
|
| 603 | * @throws FakeException |
|
| 604 | */ |
|
| 605 | private function parseMemberRequestInvitation(IEvent &$event, Circle $circle, Member $member) { |
|
| 606 | if ($event->getSubject() !== 'member_request_invitation') { |
|
| 607 | return; |
|
| 608 | } |
|
| 609 | ||
| 610 | $this->parseMemberEvent( |
|
| 611 | $event, $circle, $member, |
|
| 612 | $this->l10n->t('You sent a request to join {circle}'), |
|
| 613 | $this->l10n->t('{member} sent a request to join {circle}') |
|
| 614 | ); |
|
| 615 | ||
| 616 | throw new FakeException(); |
|
| 617 | } |
|
| 618 | ||
| 619 | ||
| 620 | /** |
|
| @@ 627-638 (lines=12) @@ | ||
| 624 | * |
|
| 625 | * @throws FakeException |
|
| 626 | */ |
|
| 627 | private function parseMemberOwner(IEvent &$event, Circle $circle, Member $member) { |
|
| 628 | if ($event->getSubject() !== 'member_owner') { |
|
| 629 | return; |
|
| 630 | } |
|
| 631 | ||
| 632 | $this->parseMemberEvent( |
|
| 633 | $event, $circle, $member, |
|
| 634 | $this->l10n->t('You are the new owner of {circle}'), |
|
| 635 | $this->l10n->t('{member} is the new owner of {circle}') |
|
| 636 | ); |
|
| 637 | throw new FakeException(); |
|
| 638 | } |
|
| 639 | ||
| 640 | ||
| 641 | /** |
|
| @@ 648-660 (lines=13) @@ | ||
| 645 | * |
|
| 646 | * @throws FakeException |
|
| 647 | */ |
|
| 648 | private function parseLinkRequestSent(IEvent &$event, Circle $circle, FederatedLink $remote) { |
|
| 649 | if ($event->getSubject() !== 'link_request_sent') { |
|
| 650 | return; |
|
| 651 | } |
|
| 652 | ||
| 653 | $this->parseCircleEvent( |
|
| 654 | $event, $circle, $remote, |
|
| 655 | $this->l10n->t('You sent a request to link {circle} with {remote}'), |
|
| 656 | $this->l10n->t('{author} sent a request to link {circle} with {remote}') |
|
| 657 | ); |
|
| 658 | ||
| 659 | throw new FakeException(); |
|
| 660 | } |
|
| 661 | ||
| 662 | ||
| 663 | /** |
|
| @@ 670-680 (lines=11) @@ | ||
| 667 | * |
|
| 668 | * @throws FakeException |
|
| 669 | */ |
|
| 670 | private function parseLinkRequestReceived(IEvent &$event, Circle $circle, FederatedLink $remote) { |
|
| 671 | if ($event->getSubject() !== 'link_request_received') { |
|
| 672 | return; |
|
| 673 | } |
|
| 674 | ||
| 675 | $this->parseLinkEvent( |
|
| 676 | $event, $circle, $remote, $this->l10n->t('{remote} requested a link with {circle}') |
|
| 677 | ); |
|
| 678 | ||
| 679 | throw new FakeException(); |
|
| 680 | } |
|
| 681 | ||
| 682 | ||
| 683 | /** |
|
| @@ 690-701 (lines=12) @@ | ||
| 687 | * |
|
| 688 | * @throws FakeException |
|
| 689 | */ |
|
| 690 | private function parseLinkRequestRejected(IEvent &$event, Circle $circle, FederatedLink $remote) { |
|
| 691 | if ($event->getSubject() !== 'link_request_rejected') { |
|
| 692 | return; |
|
| 693 | } |
|
| 694 | ||
| 695 | $this->parseLinkEvent( |
|
| 696 | $event, $circle, $remote, |
|
| 697 | $this->l10n->t('The request to link {circle} with {remote} has been rejected') |
|
| 698 | ); |
|
| 699 | ||
| 700 | throw new FakeException(); |
|
| 701 | } |
|
| 702 | ||
| 703 | ||
| 704 | /** |
|
| @@ 711-724 (lines=14) @@ | ||
| 708 | * |
|
| 709 | * @throws FakeException |
|
| 710 | */ |
|
| 711 | private function parseLinkRequestCanceled(IEvent &$event, Circle $circle, FederatedLink $remote) { |
|
| 712 | if ($event->getSubject() !== 'link_request_canceled') { |
|
| 713 | return; |
|
| 714 | } |
|
| 715 | ||
| 716 | $this->parseLinkEvent( |
|
| 717 | $event, $circle, $remote, |
|
| 718 | $this->l10n->t( |
|
| 719 | 'The request to link {remote} with {circle} has been canceled remotely' |
|
| 720 | ) |
|
| 721 | ); |
|
| 722 | ||
| 723 | throw new FakeException(); |
|
| 724 | } |
|
| 725 | ||
| 726 | ||
| 727 | /** |
|
| @@ 734-745 (lines=12) @@ | ||
| 731 | * |
|
| 732 | * @throws FakeException |
|
| 733 | */ |
|
| 734 | private function parseLinkRequestAccepted(IEvent &$event, Circle $circle, FederatedLink $remote) { |
|
| 735 | if ($event->getSubject() !== 'link_request_accepted') { |
|
| 736 | return; |
|
| 737 | } |
|
| 738 | ||
| 739 | $this->parseLinkEvent( |
|
| 740 | $event, $circle, $remote, |
|
| 741 | $this->l10n->t('The request to link {circle} with {remote} has been accepted') |
|
| 742 | ); |
|
| 743 | ||
| 744 | throw new FakeException(); |
|
| 745 | } |
|
| 746 | ||
| 747 | ||
| 748 | /** |
|
| @@ 755-767 (lines=13) @@ | ||
| 752 | * |
|
| 753 | * @throws FakeException |
|
| 754 | */ |
|
| 755 | private function parseLinkRequestRemoved(IEvent &$event, Circle $circle, FederatedLink $remote) { |
|
| 756 | if ($event->getSubject() !== 'link_request_removed') { |
|
| 757 | return; |
|
| 758 | } |
|
| 759 | ||
| 760 | $this->parseCircleEvent( |
|
| 761 | $event, $circle, $remote, |
|
| 762 | $this->l10n->t('You dismissed the request to link {remote} with {circle}'), |
|
| 763 | $this->l10n->t('{author} dismissed the request to link {remote} with {circle}') |
|
| 764 | ); |
|
| 765 | ||
| 766 | throw new FakeException(); |
|
| 767 | } |
|
| 768 | ||
| 769 | ||
| 770 | /** |
|
| @@ 777-789 (lines=13) @@ | ||
| 774 | * |
|
| 775 | * @throws FakeException |
|
| 776 | */ |
|
| 777 | private function parseLinkRequestCanceling(IEvent &$event, Circle $circle, FederatedLink $remote) { |
|
| 778 | if ($event->getSubject() !== 'link_request_canceling') { |
|
| 779 | return; |
|
| 780 | } |
|
| 781 | ||
| 782 | $this->parseCircleEvent( |
|
| 783 | $event, $circle, $remote, |
|
| 784 | $this->l10n->t('You canceled the request to link {circle} with {remote}'), |
|
| 785 | $this->l10n->t('{author} canceled the request to link {circle} with {remote}') |
|
| 786 | ); |
|
| 787 | ||
| 788 | throw new FakeException(); |
|
| 789 | } |
|
| 790 | ||
| 791 | ||
| 792 | /** |
|
| @@ 799-811 (lines=13) @@ | ||
| 796 | * |
|
| 797 | * @throws FakeException |
|
| 798 | */ |
|
| 799 | private function parseLinkRequestAccepting(IEvent &$event, Circle $circle, FederatedLink $remote) { |
|
| 800 | if ($event->getSubject() !== 'link_request_accepting') { |
|
| 801 | return; |
|
| 802 | } |
|
| 803 | ||
| 804 | $this->parseCircleEvent( |
|
| 805 | $event, $circle, $remote, |
|
| 806 | $this->l10n->t('You accepted the request to link {remote} with {circle}'), |
|
| 807 | $this->l10n->t('{author} accepted the request to link {remote} with {circle}') |
|
| 808 | ); |
|
| 809 | ||
| 810 | throw new FakeException(); |
|
| 811 | } |
|
| 812 | ||
| 813 | ||
| 814 | /** |
|
| @@ 821-832 (lines=12) @@ | ||
| 818 | * |
|
| 819 | * @throws FakeException |
|
| 820 | */ |
|
| 821 | private function parseLinkUp(IEvent &$event, Circle $circle, FederatedLink $remote) { |
|
| 822 | if ($event->getSubject() !== 'link_up') { |
|
| 823 | return; |
|
| 824 | } |
|
| 825 | ||
| 826 | $this->parseLinkEvent( |
|
| 827 | $event, $circle, $remote, |
|
| 828 | $this->l10n->t('A link between {circle} and {remote} is now up and running') |
|
| 829 | ); |
|
| 830 | ||
| 831 | throw new FakeException(); |
|
| 832 | } |
|
| 833 | ||
| 834 | ||
| 835 | /** |
|
| @@ 842-855 (lines=14) @@ | ||
| 839 | * |
|
| 840 | * @throws FakeException |
|
| 841 | */ |
|
| 842 | private function parseLinkDown(IEvent &$event, Circle $circle, FederatedLink $remote) { |
|
| 843 | if ($event->getSubject() !== 'link_down') { |
|
| 844 | return; |
|
| 845 | } |
|
| 846 | ||
| 847 | $this->parseLinkEvent( |
|
| 848 | $event, $circle, $remote, |
|
| 849 | $this->l10n->t( |
|
| 850 | 'The link between {circle} and {remote} has been shutdown remotely' |
|
| 851 | ) |
|
| 852 | ); |
|
| 853 | ||
| 854 | throw new FakeException(); |
|
| 855 | } |
|
| 856 | ||
| 857 | ||
| 858 | /** |
|
| @@ 865-877 (lines=13) @@ | ||
| 862 | * |
|
| 863 | * @throws FakeException |
|
| 864 | */ |
|
| 865 | private function parseLinkRemove(IEvent &$event, Circle $circle, FederatedLink $remote) { |
|
| 866 | if ($event->getSubject() !== 'link_remove') { |
|
| 867 | return; |
|
| 868 | } |
|
| 869 | ||
| 870 | $this->parseCircleEvent( |
|
| 871 | $event, $circle, $remote, |
|
| 872 | $this->l10n->t('You closed the link between {circle} and {remote}'), |
|
| 873 | $this->l10n->t('{author} closed the link between {circle} and {remote}') |
|
| 874 | ); |
|
| 875 | ||
| 876 | throw new FakeException(); |
|
| 877 | } |
|
| 878 | } |
|