Created
May 19, 2014 02:28
-
-
Save PyYoshi/484f530827ad844e135f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Fluent\Logger\Entity; | |
use Fluent\Logger\PackerInterface; | |
class MsgpackPacker implements PackerInterface | |
{ | |
/** | |
* pack entity as a msgpack format. | |
* | |
* @param Entity $entity | |
* @return string | |
*/ | |
public function pack(Entity $entity) | |
{ | |
return msgpack_pack(array($entity->getTag(), $entity->getTime(), $entity->getData())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment