From 45d36b0f5dd0d558e6a1d5efa9dddb98ffc7e20b Mon Sep 17 00:00:00 2001 From: danielvici123 Date: Fri, 4 Apr 2025 20:28:25 +0200 Subject: [PATCH] pogp lernen --- .idea/discord.xml | 7 ++ .../lernen/ka3/bsp_discord_server/klassen.php | 72 +++++++++++++++++++ progp/lernen/ka3/bsp_discord_server/test.php | 20 ++++++ 3 files changed, 99 insertions(+) create mode 100644 .idea/discord.xml create mode 100644 progp/lernen/ka3/bsp_discord_server/klassen.php create mode 100644 progp/lernen/ka3/bsp_discord_server/test.php diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 0000000..30bab2a --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/progp/lernen/ka3/bsp_discord_server/klassen.php b/progp/lernen/ka3/bsp_discord_server/klassen.php new file mode 100644 index 0000000..cf07fa3 --- /dev/null +++ b/progp/lernen/ka3/bsp_discord_server/klassen.php @@ -0,0 +1,72 @@ +id = $id; + $this->name = $name; + } + + public function getServer(){ + echo "Name: " .$this->name . "
ID: " . $this->id; + } + + public function beitrete():void{ + // Server beitreten + } + + public function verlassen():void{ + // Server verlassen + + } + +} + +class text_channel extends discord_Server{ + public int $channel_id; + public string $channel_text; + public string $channel_author; + function __construct(int $id, string $name, int $channel_id, string $channel_text, string $channel_author){ + parent::__construct($id, $name); + $this->channel_id = $channel_id; + $this->channel_text = $channel_text; + $this->channel_author = $channel_author; + } + public function löschen():void{ + // text channel löschen + } + public function bearbeiten():void{ + // text channel bearbeiten + } + public function gettextchannel():void{ + parent::getServer(); + echo "
Text Channel ID: " . $this->channel_id; + echo "
Text Channel Text: " . $this->channel_text; + echo "
Text Channel Author: " . $this->channel_author; + } +} + +class voice_channel extends discord_Server{ + private int $voice_id; + public array $nutzer; + function __construct(int $id, string $name, int $voice_id, array $nutzer ){ + parent::__construct($id, $name); + $this->voice_id = $voice_id; + $this->nutzer = $nutzer; + } + public function löschen():void{ + // text channel löschen + } + public function bearbeiten():void{ + // text channel bearbeiten + } + public function getvoicechannel():void{ + parent::getServer(); + echo "
Voice Channel ID: " . $this->voice_id; + echo "
Nutzer: " . var_dump($this->nutzer); + } +} \ No newline at end of file diff --git a/progp/lernen/ka3/bsp_discord_server/test.php b/progp/lernen/ka3/bsp_discord_server/test.php new file mode 100644 index 0000000..a0aed96 --- /dev/null +++ b/progp/lernen/ka3/bsp_discord_server/test.php @@ -0,0 +1,20 @@ + + + + + + Grundgerüst + + +

Nicht Discord API

+ + + +Text Channel"; +$tc = new text_channel(1, "Rasselbande", 500, "Paulaner Garten", "umisakii" ); +$tc->gettextchannel(); +echo "

Voice Channel

"; +$vc = new voice_channel(1, "Rasselbande", 500, ["danielvici123", "umisakii", "Pepper(oni)"] ); +$vc->getvoicechannel(); \ No newline at end of file