Exemplo n.º 1
0
 /**
  * Returns the application icon for registration in Growl
  *
  * @return string application icon binary data or empty if default image
  * @see setGrowlIcon()
  */
 public function getGrowlIcon()
 {
     if ($this->_growlAppIcon instanceof Net_Growl_Icon) {
         return $this->_growlAppIcon->getContents();
     }
     return '';
 }
Exemplo n.º 2
0
 /**
  * Returns Growl default icon logo binary data
  *
  * @return string
  * @throws Net_Growl_Exception if cannot get icon resource contents
  */
 public function getDefaultGrowlIcon()
 {
     if (isset($this->options['resourceDir']) && is_dir($this->options['resourceDir'])) {
         $resourceDir = $this->options['resourceDir'];
     } else {
         $resourceDir = dirname(__FILE__);
     }
     $icon = new Net_Growl_Icon($resourceDir . DIRECTORY_SEPARATOR . $this->options['defaultIcon']);
     $data = $icon->getContents();
     if (empty($data)) {
         throw new Net_Growl_Exception('Invalid Icon Resource');
     }
     return $data;
 }