added jsonserializable interface / trait

This commit is contained in:
kremsy
2017-04-04 19:40:19 +02:00
parent 738c7a134c
commit 527c37d006
12 changed files with 63 additions and 13 deletions

View File

@@ -0,0 +1,14 @@
<?php
namespace ManiaControl\General;
/**
* Class DumpTrait Trait for Implementing the Methods for the JsonSerializeable Interface
*
* @package ManiaControl\General
*/
trait JsonSerializeTrait {
public function toJson(){
return json_encode(get_object_vars($this));
}
}