Beispiel #1
0
 /**
  * Constructor
  */
 function __construct(Config $config, array $post)
 {
     // Set config
     $this->setConfig($config);
     // If it's a message
     if ($this->isMessage($post)) {
         // Create new message
         $this->message = Loader::message($post);
         // If shortcode doesn't match
         if ($this->message->shortcode != $this->config->shortcode) {
             // Unset message
             unset($this->message);
         }
     }
     // If it's a notification
     if ($this->isNotification($post)) {
         // Create new notification
         $this->notification = Loader::notification($post);
         // If shortcode doesn't match
         if ($this->notification->shortcode != $this->config->shortcode) {
             // Unset notification
             unset($this->notification);
         }
     }
 }