/** * Gets the formatter to be used by this writer * @return \Nimbles\Core\Log\Formatter */ public function getFormatterObject() { if (null === $this->_formatter) { $this->_formatter = FormatterAbstract::factory($this->getOption('formatter')); } return $this->_formatter; }
/** * Tests creating a formatter from valid options * @dataProvider validOptionsProvider * @param string|array $options * @return void */ public function testValidOptionsFactory($options) { $formatter = \Nimbles\Core\Log\Formatter\FormatterAbstract::factory($options); $this->assertInstanceOf('\\Nimbles\\Core\\Log\\Formatter\\Simple', $formatter); }