Explorar o código

Tweak HandlerWrapper example in docblock, fixes #991

Jordi Boggiano %!s(int64=8) %!d(string=hai) anos
pai
achega
357ae23fa4
Modificáronse 1 ficheiros con 10 adicións e 8 borrados
  1. 10 8
      src/Monolog/Handler/HandlerWrapper.php

+ 10 - 8
src/Monolog/Handler/HandlerWrapper.php

@@ -16,15 +16,17 @@ use Monolog\Formatter\FormatterInterface;
 /**
 /**
  * This simple wrapper class can be used to extend handlers functionality.
  * This simple wrapper class can be used to extend handlers functionality.
  *
  *
- * Example: A filtering handle. Inherit from this class, override isHandling() like this
+ * Example: A custom filtering that can be applied to any handler.
  *
  *
- * public function isHandling(array $record)
- * {
- *      if ($record meets certain conditions) {
- *          return false;
- *      }
- *      return $this->handler->isHandling($record);
- * }
+ * Inherit from this class and override handle() like this:
+ *
+ *   public function handle(array $record)
+ *   {
+ *        if ($record meets certain conditions) {
+ *            return false;
+ *        }
+ *        return $this->handler->handle($record);
+ *   }
  *
  *
  * @author Alexey Karapetov <alexey@karapetov.com>
  * @author Alexey Karapetov <alexey@karapetov.com>
  */
  */