Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace MyABSInterface;
- interface template
- {
- public function getVideo($type);
- }
- namespace MyABS;
- use MyABSInterface;
- class Abstracted implements \MyABSInterface\template
- {
- public function getVideo($type)
- {
- switch ($type)
- {
- case 'mp3':
- echo "mp3";
- break;
- case 'mp4':
- echo "mp4";
- break;
- }
- }
- }
- namespace MyVoice;
- use MyABS;
- class VoidChat extends \MyABS\Abstracted
- {
- function __construct()
- {
- $this->showVoice();
- }
- private function showVoice()
- {
- $this->getVideo("mp3");
- }
- }
- namespace display;
- use MyVoice;
- class Showlive extends \MyVoice\VoidChat
- {
- function __construct()
- {
- new \MyVoice\VoidChat();
- $this->showVideo();
- }
- public function showVideo()
- {
- $this->getVideo("mp4");
- return $this;
- }
- public function showVoice()
- {
- echo "OLA GELERA!";
- }
- }
- ?>
- <?php
- use display;
- $callSpeak = new \display\Showlive();
- $callSpeak->showVoice();
Add Comment
Please, Sign In to add comment