add a simple example with a null logger

This commit is contained in:
Trismegiste
2013-05-13 21:49:33 +02:00
parent 3fcd8fbcba
commit ceeab58eb9
4 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
/*
* DesignPatternPHP
*/
namespace DesignPatterns\NullObject;
/**
* PrintLogger is a logger that prints the log entry to standard output
*/
class PrintLogger implements LoggerInterface
{
public function log($str)
{
echo $str;
}
}