diff options
Diffstat (limited to 'vendor/guzzle/guzzle/src/Guzzle/Log/ArrayLogAdapter.php')
-rw-r--r-- | vendor/guzzle/guzzle/src/Guzzle/Log/ArrayLogAdapter.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/vendor/guzzle/guzzle/src/Guzzle/Log/ArrayLogAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Log/ArrayLogAdapter.php new file mode 100644 index 0000000..a70fc8d --- /dev/null +++ b/vendor/guzzle/guzzle/src/Guzzle/Log/ArrayLogAdapter.php @@ -0,0 +1,34 @@ +<?php + +namespace Guzzle\Log; + +/** + * Stores all log messages in an array + */ +class ArrayLogAdapter implements LogAdapterInterface +{ + protected $logs = array(); + + public function log($message, $priority = LOG_INFO, $extras = array()) + { + $this->logs[] = array('message' => $message, 'priority' => $priority, 'extras' => $extras); + } + + /** + * Get logged entries + * + * @return array + */ + public function getLogs() + { + return $this->logs; + } + + /** + * Clears logged entries + */ + public function clearLogs() + { + $this->logs = array(); + } +} |