original_string: public function handle(NotificationInterface $notification, $level)
      {
          if ($notification instanceof AttributeAwareInterface)
          {
              $options = $notification->attributes();
          }
          else
          {
              $options = [];
          }
  
          if ($notification instanceof TitleAwareInterface)
          {
              $options['header'] = $notification->title();
          }
  
          $variable = [
              'message' => $notification->message(),
              'type'    => isset($this->levelMapping[$level]) ? $this->levelMapping[$level] : self::STANDARD,
              'options' => $options
          ];
  
          $current = $this->smarty->getTemplateVars($this->var);
  
          if (!$current)
          {
              $this->smarty->assign($this->var, [$variable]);
          }
          else
          {
              $this->smarty->append($this->var, $variable);
          }
  
          return true;
      }
code: public function handle(NotificationInterface $notification, $level)
      {
          if ($notification instanceof AttributeAwareInterface)
          {
              $options = $notification->attributes();
          }
          else
          {
              $options = [];
          }
  
          if ($notification instanceof TitleAwareInterface)
          {
              $options['header'] = $notification->title();
          }
  
          $variable = [
              'message' => $notification->message(),
              'type'    => isset($this->levelMapping[$level]) ? $this->levelMapping[$level] : self::STANDARD,
              'options' => $options
          ];
  
          $current = $this->smarty->getTemplateVars($this->var);
  
          if (!$current)
          {
              $this->smarty->assign($this->var, [$variable]);
          }
          else
          {
              $this->smarty->append($this->var, $variable);
          }
  
          return true;
      }
code_tokens: public function handle ( NotificationInterface $ notification , $ level ) { if ( $ notification instanceof AttributeAwareInterface ) { $ options = $ notification -> attributes ( ) ; } else { $ options = [ ] ; } if ( $ notification instanceof TitleAwareInterface ) { $ options [ 'header' ] = $ notification -> title ( ) ; } $ variable = [ 'message' => $ notification -> message ( ) , 'type' => isset ( $ this -> levelMapping [ $ level ] ) ? $ this -> levelMapping [ $ level ] : self :: STANDARD , 'options' => $ options ] ; $ current = $ this -> smarty -> getTemplateVars ( $ this -> var ) ; if ( ! $ current ) { $ this -> smarty -> assign ( $ this -> var , [ $ variable ] ) ; } else { $ this -> smarty -> append ( $ this -> var , $ variable ) ; } return true ; }
docstring: Handle a notification.
  
  @return  boolean
docstring_tokens: Handle a notification .