original_string: public static function bindEventsToModel(HalcyonModel $template)
      {
          $template->bindEvent('model.beforeDelete', function () use ($template) {
              self::add($template, self::TYPE_DELETE);
          });
  
          $template->bindEvent('model.beforeSave', function () use ($template) {
              self::add($template, $template->exists ? self::TYPE_UPDATE : self::TYPE_CREATE);
          });
      }
code: public static function bindEventsToModel(HalcyonModel $template)
      {
          $template->bindEvent('model.beforeDelete', function () use ($template) {
              self::add($template, self::TYPE_DELETE);
          });
  
          $template->bindEvent('model.beforeSave', function () use ($template) {
              self::add($template, $template->exists ? self::TYPE_UPDATE : self::TYPE_CREATE);
          });
      }
code_tokens: public static function bindEventsToModel ( HalcyonModel $ template ) { $ template -> bindEvent ( 'model.beforeDelete' , function ( ) use ( $ template ) { self :: add ( $ template , self :: TYPE_DELETE ) ; } ) ; $ template -> bindEvent ( 'model.beforeSave' , function ( ) use ( $ template ) { self :: add ( $ template , $ template -> exists ? self :: TYPE_UPDATE : self :: TYPE_CREATE ) ; } ) ; }
docstring: Adds observers to the model for logging purposes.
docstring_tokens: Adds observers to the model for logging purposes .