/home/techb158/exp.abdallabala.com/vendor/monolog/monolog/src/Monolog/Handler
NameSizeModeActions
Curl/-0755rm
FingersCrossed/-0755rm
Slack/-0755rm
SyslogUdp/-0755rm
AbstractHandler.php43900644editdlrm
AbstractProcessingHandler.php15320644editdlrm
AbstractSyslogHandler.php33710644editdlrm
AmqpHandler.php38660644editdlrm
BrowserConsoleHandler.php74010644editdlrm
BufferHandler.php40300644editdlrm
ChromePHPHandler.php56540644editdlrm
CouchDBHandler.php19530644editdlrm
CubeHandler.php46620644editdlrm
DeduplicationHandler.php54790644editdlrm
DoctrineCouchDBHandler.php10000644editdlrm
DynamoDbHandler.php24850644editdlrm
ElasticSearchHandler.php34130644editdlrm
ErrorLogHandler.php23680644editdlrm
FilterHandler.php51480644editdlrm
FingersCrossedHandler.php66130644editdlrm
FirePHPHandler.php54620644editdlrm
FleepHookHandler.php33630644editdlrm
FlowdockHandler.php33820644editdlrm
FormattableHandlerInterface.php9230644editdlrm
FormattableHandlerTrait.php13940644editdlrm
GelfHandler.php19940644editdlrm
GroupHandler.php27930644editdlrm
HandlerInterface.php25910644editdlrm
HandlerWrapper.php23660644editdlrm
HipChatHandler.php109990644editdlrm
IFTTTHandler.php21390644editdlrm
InsightOpsHandler.php18740644editdlrm
LogEntriesHandler.php16150644editdlrm
LogglyHandler.php26190644editdlrm
MailHandler.php16220644editdlrm
MandrillHandler.php21560644editdlrm
MissingExtensionException.php4500644editdlrm
MongoDBHandler.php16060644editdlrm
NativeMailerHandler.php52060644editdlrm
NewRelicHandler.php62460644editdlrm
NullHandler.php9530644editdlrm
PHPConsoleHandler.php100270644editdlrm
ProcessableHandlerInterface.php10170644editdlrm
ProcessableHandlerTrait.php15990644editdlrm
PsrHandler.php14330644editdlrm
PushoverHandler.php66260644editdlrm
RavenHandler.php74140644editdlrm
RedisHandler.php29600644editdlrm
RollbarHandler.php39420644editdlrm
RotatingFileHandler.php59360644editdlrm
SamplingHandler.php32840644editdlrm
SlackbotHandler.php23800644editdlrm
SlackHandler.php64790644editdlrm
SlackWebhookHandler.php38450644editdlrm
SocketHandler.php98120644editdlrm
StreamHandler.php53190644editdlrm
SwiftMailerHandler.php34360644editdlrm
SyslogHandler.php18430644editdlrm
SyslogUdpHandler.php32200644editdlrm
TestHandler.php53760644editdlrm
WhatFailureGroupHandler.php18410644editdlrm
ZendMonitorHandler.php30020644editdlrm
Edit: /home/techb158/exp.abdallabala.com/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php (5376B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Monolog\Handler; /** * Used for testing purposes. * * It records all records and gives you access to them for verification. * * @author Jordi Boggiano * * @method bool hasEmergency($record) * @method bool hasAlert($record) * @method bool hasCritical($record) * @method bool hasError($record) * @method bool hasWarning($record) * @method bool hasNotice($record) * @method bool hasInfo($record) * @method bool hasDebug($record) * * @method bool hasEmergencyRecords() * @method bool hasAlertRecords() * @method bool hasCriticalRecords() * @method bool hasErrorRecords() * @method bool hasWarningRecords() * @method bool hasNoticeRecords() * @method bool hasInfoRecords() * @method bool hasDebugRecords() * * @method bool hasEmergencyThatContains($message) * @method bool hasAlertThatContains($message) * @method bool hasCriticalThatContains($message) * @method bool hasErrorThatContains($message) * @method bool hasWarningThatContains($message) * @method bool hasNoticeThatContains($message) * @method bool hasInfoThatContains($message) * @method bool hasDebugThatContains($message) * * @method bool hasEmergencyThatMatches($message) * @method bool hasAlertThatMatches($message) * @method bool hasCriticalThatMatches($message) * @method bool hasErrorThatMatches($message) * @method bool hasWarningThatMatches($message) * @method bool hasNoticeThatMatches($message) * @method bool hasInfoThatMatches($message) * @method bool hasDebugThatMatches($message) * * @method bool hasEmergencyThatPasses($message) * @method bool hasAlertThatPasses($message) * @method bool hasCriticalThatPasses($message) * @method bool hasErrorThatPasses($message) * @method bool hasWarningThatPasses($message) * @method bool hasNoticeThatPasses($message) * @method bool hasInfoThatPasses($message) * @method bool hasDebugThatPasses($message) */ class TestHandler extends AbstractProcessingHandler { protected $records = array(); protected $recordsByLevel = array(); private $skipReset = false; public function getRecords() { return $this->records; } public function clear() { $this->records = array(); $this->recordsByLevel = array(); } public function reset() { if (!$this->skipReset) { $this->clear(); } } public function setSkipReset($skipReset) { $this->skipReset = $skipReset; } public function hasRecords($level) { return isset($this->recordsByLevel[$level]); } /** * @param string|array $record Either a message string or an array containing message and optionally context keys that will be checked against all records * @param int $level Logger::LEVEL constant value */ public function hasRecord($record, $level) { if (is_string($record)) { $record = array('message' => $record); } return $this->hasRecordThatPasses(function ($rec) use ($record) { if ($rec['message'] !== $record['message']) { return false; } if (isset($record['context']) && $rec['context'] !== $record['context']) { return false; } return true; }, $level); } public function hasRecordThatContains($message, $level) { return $this->hasRecordThatPasses(function ($rec) use ($message) { return strpos($rec['message'], $message) !== false; }, $level); } public function hasRecordThatMatches($regex, $level) { return $this->hasRecordThatPasses(function ($rec) use ($regex) { return preg_match($regex, $rec['message']) > 0; }, $level); } public function hasRecordThatPasses($predicate, $level) { if (!is_callable($predicate)) { throw new \InvalidArgumentException("Expected a callable for hasRecordThatSucceeds"); } if (!isset($this->recordsByLevel[$level])) { return false; } foreach ($this->recordsByLevel[$level] as $i => $rec) { if (call_user_func($predicate, $rec, $i)) { return true; } } return false; } /** * {@inheritdoc} */ protected function write(array $record) { $this->recordsByLevel[$record['level']][] = $record; $this->records[] = $record; } public function __call($method, $args) { if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; $level = constant('Monolog\Logger::' . strtoupper($matches[2])); if (method_exists($this, $genericMethod)) { $args[] = $level; return call_user_func_array(array($this, $genericMethod), $args); } } throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); } }