mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
40 lines
717 B
PHP
40 lines
717 B
PHP
<?php
|
|
|
|
namespace SilverStripe\FullTextSearch\Tests\SolrReindexTest;
|
|
|
|
use Monolog\Handler\AbstractProcessingHandler;
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
/**
|
|
* Logger for recording messages for later retrieval
|
|
*/
|
|
class SolrReindexTest_Handler extends AbstractProcessingHandler implements TestOnly
|
|
{
|
|
/**
|
|
* Messages
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $messages = array();
|
|
|
|
/**
|
|
* Get all messages
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getMessages()
|
|
{
|
|
return $this->messages;
|
|
}
|
|
|
|
public function clear()
|
|
{
|
|
$this->messages = array();
|
|
}
|
|
|
|
protected function write(array $record)
|
|
{
|
|
$this->messages[] = $record['message'];
|
|
}
|
|
}
|