| 1234567891011121314151617181920212223 |
- <?php
- namespace phpnotify;
- require_once('notification.php');
- class subject {
- private string $url;
- private string $subject;
- public function __construct(string $url, string $subject) {
- $this->url = $url;
- $this->subject = $subject;
- }
- private function get_subject_url(): string {
- return $this->url.'/'.$this->subject;
- }
- public function publish(string $content): notification {
- return new notification($this->get_subject_url(), $content);
- }
- }
|