Array.php
1 year ago
Broken.php
1 year ago
ClassWithCtor.php
1 year ago
ComplexClassWithCtor.php
1 year ago
DependencyInjector.php
1 year ago
DerivedClass.php
1 year ago
DerivedClass2.php
1 year ago
FactoryMethod.php
1 year ago
FactoryMethodWithError.php
1 year ago
JsonMapperCommentsDiscardedException.php
1 year ago
JsonMapperForCheckingAllowedPaths.php
1 year ago
Logger.php
1 year ago
MapsWithSetters.php
1 year ago
Php7TypedClass.php
1 year ago
Php7_1TypedClass.php
1 year ago
PrivateWithSetter.php
1 year ago
Simple.php
1 year ago
SimpleBase.php
1 year ago
SimpleBaseWithMissingDiscrimType.php
1 year ago
ValueObject.php
1 year ago
Logger.php
41 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Part of JsonMapper |
| 4 | * |
| 5 | * PHP version 5 |
| 6 | * |
| 7 | * @category Netresearch |
| 8 | * @package JsonMapper |
| 9 | * @author Christian Weiske <christian.weiske@netresearch.de> |
| 10 | * @license OSL-3.0 http://opensource.org/licenses/osl-3.0 |
| 11 | * @link http://www.netresearch.de/ |
| 12 | */ |
| 13 | |
| 14 | /** |
| 15 | * Simple in-memory logger |
| 16 | * |
| 17 | * @category Netresearch |
| 18 | * @package JsonMapper |
| 19 | * @author Christian Weiske <christian.weiske@netresearch.de> |
| 20 | * @license OSL-3.0 http://opensource.org/licenses/osl-3.0 |
| 21 | * @link http://www.netresearch.de/ |
| 22 | */ |
| 23 | class JsonMapperTest_Logger |
| 24 | { |
| 25 | public $log = array(); |
| 26 | |
| 27 | /** |
| 28 | * Log a message to the $logger object |
| 29 | * |
| 30 | * @param string $level Logging level |
| 31 | * @param string $message Text to log |
| 32 | * @param array $context Additional information |
| 33 | * |
| 34 | * @return null |
| 35 | */ |
| 36 | public function log($level, $message, array $context = array()) |
| 37 | { |
| 38 | $this->log[] = array($level, $message, $context); |
| 39 | } |
| 40 | } |
| 41 | ?> |