Skip to content

Instantly share code, notes, and snippets.

@Adamwaheed
Created February 23, 2020 10:54
Show Gist options
  • Save Adamwaheed/74fac1a7fbd63c0dc5431d0e499f0543 to your computer and use it in GitHub Desktop.
Save Adamwaheed/74fac1a7fbd63c0dc5431d0e499f0543 to your computer and use it in GitHub Desktop.
<?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