dev-master
9999999-dev https://github.com/bronto/php-common-helper
Apache-2.0
The Development Requires
php common bronto
1.0.1
1.0.1.0 https://github.com/bronto/php-common-helper
Apache-2.0
The Development Requires
php common bronto
This package is archived and no longer maintained., (*1)
This package contains a number of common scripts and utilities used throughout the PHP packages provided by Bronto., (*2)
Provided is a set of functional utilties and a chainable object that wraps an associative array., (*3)
The library ships with a pretty nice cURL transfer impl, (*4)
<?php $json = new \Bronto\Serialize\Json\Standard(); $curls = new \Bronto\Transfer\Curl\Adapter(); $request = $curls->createRequest('GET', 'http://some-resource.com'); $response = $request->respond(); $data = $json->decode($response->body()); $multi = new \Bronto\Transfer\Curl\Multi(); // Below are the defaults $multi ->setMaxConnections(10) ->setPipeLining(true) ->setExecuteEagerly(true); foreach ($data as $customer) { $request = $curls->createRequest('POST', 'http://some-resource.com') ->header('Authorization', 'Bearer: abc123') ->header('Content-Type', $json->getMimeType()) ->body($json->encode($customer)) ->on('complete', function($response) { var_dump($response); }); $multi->add($request); } $multi->complete();
Apache-2.0
php common bronto
Apache-2.0
php common bronto