pickling
1.0.0
pickling เป็นไคลเอนต์ที่เรียบง่ายแต่ทรงพลังสำหรับ PHP Extension Community Library และ PHP Extension และ Application Repository REST API
ที่แกนหลัก pickling จะทำงานนอกกรอบกับไคลเอนต์ HTTP จำนวนมากผ่าน HTTPlug Discovery
กล่าวอีกนัยหนึ่ง ต้องมีอย่างน้อยหนึ่งแพ็คเกจสำหรับการใช้งานแต่ละอย่างต่อไปนี้:
วิธีเพิ่ม pickling ให้กับผู้แต่ง:
composer require pecm/ pickling
คำแนะนำทั่วไปสำหรับไคลเอ็นต์ HTTP โดยใช้ kriswallsmith/buzz และ nyholm/psr7:
composer require kriswallsmith/buzz nyholm/psr7
ตัวอย่างการใช้งานเพิ่มเติมนอกเหนือจากตัวอย่างง่ายๆ ด้านล่างนี้สามารถพบได้ใน example/ โฟลเดอร์
การสร้างอินสแตนซ์ของโรงงาน
// pecl client with standard options
$ peclClient = pickling Factory:: createPecl ();
// pear client with standard options
$ pearClient = pickling Factory:: createPear ();
การสร้างอินสแตนซ์ที่กำหนดเอง
// pecl client
$ peclClient = new pickling Client (
// a class that implements pickling ChannelChannelInterface
new pickling Channel Pecl (),
// a class that implements PsrHttpClientClientInterface
new Http Client Socket Client (),
// a class that implements PsrHttpMessageRequestFactoryInterface
new Nyholm Psr7 Factory Psr17Factory (),
// a class that implements PsrHttpMessageStreamFactoryInterface
new Nyholm Psr7 Factory Psr17Factory ()
);
// pear client
$ pearClient = new pickling Client (
// a class that implements pickling ChannelChannelInterface
new pickling Channel Pear (),
// a class that implements PsrHttpClientClientInterface
new Http Client Socket Client (),
// a class that implements PsrHttpMessageRequestFactoryInterface
new Nyholm Psr7 Factory Psr17Factory (),
// a class that implements PsrHttpMessageStreamFactoryInterface
new Nyholm Psr7 Factory Psr17Factory ()
);
รับรายการแพ็คเกจ
$ peclClient -> getPackageList ();
pickling Resource PackageList Object
(
[channel: pickling Resource PackageList :private] => " pecl.php.net "
[list: pickling Resource PackageList :private] => Array
(
[ 0 ] => " ahocorasick "
// ...
[ 408 ] => " zstd "
)
)
รับรายการวางจำหน่ายแพ็คเกจ
$ peclClient -> with ( ' amqp ' )-> getReleaseList ();
pickling Resource Package ReleaseList Object
(
[packageName: pickling Resource Package ReleaseList :private] => " amqp "
[channel: pickling Resource Package ReleaseList :private] => " pecl.php.net "
[list: pickling Resource Package ReleaseList :private] => Array
(
[ 0 ] => pickling Resource Package Release Version Object
(
[number: pickling Resource Package Release Version :private] => " 1.10.2 "
[stability: pickling Resource Package Release Version :private] => " stable "
)
// ...
[ 41 ] => pickling Resource Package Release Version Object
(
[number: pickling Resource Package Release Version :private] => " 0.1.0 "
[stability: pickling Resource Package Release Version :private] => " beta "
)
)
)
รับแพ็คเกจรุ่นล่าสุด
$ peclClient -> with ( ' amqp ' )-> getLatestVersion ();
" 1.10.2 "
รับข้อมูลแพ็คเกจ
$ peclClient -> with ( ' amqp ' )-> getInfo ();
pickling Resource Package Info Object
(
[packageName: pickling Resource Package Info :private] => " amqp "
[channel: pickling Resource Package Info :private] => " pecl.php.net "
[category: pickling Resource Package Info :private] => " Networking "
[license: pickling Resource Package Info :private] => " PHP License "
[licenseUri: pickling Resource Package Info :private] => ""
[summary: pickling Resource Package Info :private] => " Communicate with any AMQP compliant server "
[description: pickling Resource Package Info :private] => " This extension can communicate with any AMQP spec 0-9-1 compatible server, such as RabbitMQ, OpenAMQP and Qpid, giving you the ability to create and delete exchanges and queues, as well as publish to any exchange and consume from any queue. "
[packageReleasesLocation: pickling Resource Package Info :private] => ""
[parentPackage: pickling Resource Package Info :private] => ""
[packageReplaceBy: pickling Resource Package Info :private] => ""
[channelReplaceBy: pickling Resource Package Info :private] => ""
)
รับข้อมูลการเผยแพร่
$ peclClient -> with ( ' amqp ' )-> at ( ' 1.10.2 ' )-> getInfo ();
pickling Resource Package Release Info Object
(
[packageName: pickling Resource Package Release Info :private] => " amqp "
[channel: pickling Resource Package Release Info :private] => " pecl.php.net "
[version: pickling Resource Package Release Info :private] => " 1.10.2 "
[stability: pickling Resource Package Release Info :private] => " stable "
[license: pickling Resource Package Release Info :private] => " PHP License "
[releasingMaintainer: pickling Resource Package Release Info :private] => " lstrojny "
[summary: pickling Resource Package Release Info :private] => " Communicate with any AMQP compliant server "
[description: pickling Resource Package Release Info :private] => " This extension can communicate with any AMQP spec 0-9-1 compatible server, such as RabbitMQ, OpenAMQP and Qpid, giving you the ability to create and delete exchanges and queues, as well as publish to any exchange and consume from any queue. "
[releaseDate: pickling Resource Package Release Info :private] => " 2020-04-05 15:41:28 "
[releaseNotes: pickling Resource Package Release Info :private] => " - Windows build: avoid variable lengths arrays (Christoph M. Becker) (https://github.com/pdezwart/php-amqp/issues/368)
For a complete list of changes see:
https://github.com/pdezwart/php-amqp/compare/v1.10.1...v1.10.2 "
[releaseSize: pickling Resource Package Release Info :private] => 107350
[downloadUri: pickling Resource Package Release Info :private] => " https://pecl.php.net/get/amqp-1.10.2 "
[packageLink: pickling Resource Package Release Info :private] => ""
)
ห้องสมุดนี้ได้รับอนุญาตภายใต้ใบอนุญาต MIT