Last active
October 31, 2019 23:16
-
-
Save ismail1432/668b1cc618a07639d686eedd62d073aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait DisableListenerTrait | |
{ | |
private $enabled = true; | |
public function disable(): void | |
{ | |
$this->enabled = false; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FooRequestListener | |
{ | |
use DisableListenerTrait; | |
// ... | |
} | |
class UserSubscriber | |
{ | |
use DisableListenerTrait; | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment