Created
February 23, 2020 10:54
-
-
Save Adamwaheed/74fac1a7fbd63c0dc5431d0e499f0543 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
interface TelegramInterface | |
{ | |
public function send(); | |
} | |
class Telegram | |
{ | |
public function send(TelegramInterface $telegram) | |
{ | |
$telegram->send(); | |
} | |
} | |
abstract class TelegramBase | |
{ | |
abstract public function createText(); | |
public function sendMessage($text){ | |
//send | |
} | |
} | |
class SalesNotification extends TelegramBase implements TelegramInterface | |
{ | |
public $sales; | |
public function __construct(Sales $sales) | |
{ | |
parent::__construct(); | |
$this->sales= sales; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment