vendor/rollbar/rollbar/src/Payload/Notifier.php line 3

Open in your IDE?
  1. <?php namespace Rollbar\Payload;
  2. class Notifier implements \Serializable
  3. {
  4.     const NAME "rollbar-php";
  5.     const VERSION "2.1.0";
  6.     public static function defaultNotifier()
  7.     {
  8.         return new Notifier(self::NAMEself::VERSION);
  9.     }
  10.     private $name;
  11.     private $version;
  12.     private $utilities;
  13.     public function __construct($name$version)
  14.     {
  15.         $this->utilities = new \Rollbar\Utilities();
  16.         $this->setName($name);
  17.         $this->setVersion($version);
  18.     }
  19.     public function getName()
  20.     {
  21.         return $this->name;
  22.     }
  23.     public function setName($name)
  24.     {
  25.         $this->name $name;
  26.         return $this;
  27.     }
  28.     public function getVersion()
  29.     {
  30.         return $this->version;
  31.     }
  32.     public function setVersion($version)
  33.     {
  34.         $this->version $version;
  35.         return $this;
  36.     }
  37.     public function serialize()
  38.     {
  39.         $result = array(
  40.             "name" => $this->name,
  41.             "version" => $this->version,
  42.         );
  43.         
  44.         $objectHashes \Rollbar\Utilities::getObjectHashes();
  45.         
  46.         return $this->utilities->serializeForRollbar($resultnull$objectHashes);
  47.     }
  48.     
  49.     public function unserialize($serialized)
  50.     {
  51.         throw new \Exception('Not implemented yet.');
  52.     }
  53. }