Download the PHP package guancheng/msgpack without Composer
On this page you can find all versions of the php package guancheng/msgpack. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package msgpack
msgpack
The lumen api response wrapper for rybakit/msgpack.
Install
composer require guancheng/msgpack
or
clone / download this repo
Usage
Response
use Illuminate\Routing\Controller;
use LGC\Msgpack\MsgpackResponse;
class TestController extends Controller
{
public function test()
{
return new MsgpackResponse([
'success' => true
]);
}
}
If you want to return Arrayable object, just do it!
use Illuminate\Support\Collection;
use Illuminate\Routing\Controller;
use LGC\Msgpack\MsgpackResponse;
class TestController extends Controller
{
public function test()
{
return new MsgpackResponse([
'success' => true,
'data' => new Collection([
'hello' => 'lumtify'
])
]);
}
}
When use arrayable types you have to notice: due to we don't remember pack data type, so the getData() always return array
Test
use LGC\Msgpack\MsgpackConcern;
class TestApiTest extends PHPUnit_Framework_TestCase
{
use MsgpackConcern;
public function testShouldSeeMsgpack()
{
$this->shouldSeeMsgpack();
}
}
Development
clone the repo
composer install
Roadmap
Make other laravel data type transformer.
Licence
MIT
Support on Beerpay
Hey dude! Help me out for a couple of :beers:!
All versions of msgpack with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5.9
symfony/http-kernel Version ~2.7|~3.0
illuminate/support Version ~5.3
illuminate/http Version ~5.3
rybakit/msgpack Version ^0.2.2
symfony/http-kernel Version ~2.7|~3.0
illuminate/support Version ~5.3
illuminate/http Version ~5.3
rybakit/msgpack Version ^0.2.2
The package guancheng/msgpack contains the following files
Loading the files please wait ....