Download the PHP package flaschenpost/azurelib without Composer
On this page you can find all versions of the php package flaschenpost/azurelib. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flaschenpost/azurelib
More information about flaschenpost/azurelib
Files in flaschenpost/azurelib
Package azurelib
Short Description This project provides a set of PHP client libraries that make it easy to access Windows Azure tables, blobs, queues, service runtime and service management APIs.
License Apache-2.0
Informations about the package azurelib
Flaschenpost Azure Library for PHP
This project provides a set of PHP client libraries that make it easy to access Microsoft™ Azure service bus (queues and topics).
Features
- Service Bus
- Queues: create, list and delete queues; send, receive, unlock and delete messages
- Topics: create, list, and delete topics; create, list, and delete subscriptions; send, receive, unlock and delete messages; create, list, and delete rules
Getting Started
Download Source Code
To get the source code from our repository, type
Note
The recommended way to resolve dependencies is to install them using the Composer package manager.
Install via Composer
-
Create a file named composer.json in the root of your project and add the following code to it:
-
Download composer.phar in your project root.
-
Open a command prompt and execute this in your project root
Note
On Windows, you will also need to add the Git executable to your PATH environment variable.
Usage
Getting Started
There are four basic steps that have to be performed before you can make a call to any Microsoft Azure API when using the libraries.
-
First, include the autoloader script:
-
Include the namespaces you are going to use.
To create any Microsoft Azure service client you need to use the ServicesBuilder class:
To process exceptions you need:
-
To instantiate the service client you will also need a valid connection string. The format is:
-
For accessing a live storage service (tables, blobs, queues):
- For accessing the Service Bus:
Where the Endpoint is typically of the format
https://[yourNamespace].servicebus.windows.net
. -
- Instantiate a "REST Proxy" - a wrapper around the available calls for the given service.
-
- For Service Bus:
Service Bus Queues
The current PHP Service Bus APIs only support ACS connection strings. You need to use PowerShell to create a new ACS Service Bus namespace at the present time. First, make sure you have Azure PowerShell installed, then in a PowerShell command prompt, run
If it is sucessful, you will get the connection string in the PowerShell output. If you get connection errors with it and the conection string looks like Endpoint=sb://..., change it to Endpoint=https://...
Create a Queue
Send a Message
To send a message to a Service Bus queue, your application will call the ServiceBusRestProxy->sendQueueMessage method. Messages sent to (and received from ) Service Bus queues are instances of the BrokeredMessage class.
Receive a Message
The primary way to receive messages from a queue is to use a ServiceBusRestProxy->receiveQueueMessage method. Messages can be received in two different modes: ReceiveAndDelete (mark message as consumed on read) and PeekLock (locks message for a period of time, but does not delete).
The example below demonstrates how a message can be received and processed using PeekLock mode (not the default mode).
Service Bus Topics
Create a Topic
Create a subscription with the default (MatchAll) filter
Send a message to a topic
Messages sent to Service Bus topics are instances of the BrokeredMessage class.
Receive a message from a topic
The primary way to receive messages from a subscription is to use a ServiceBusRestProxy->receiveSubscriptionMessage method. Received messages can work in two different modes: ReceiveAndDelete (the default) and PeekLock similarly to Service Bus Queues.
The example below demonstrates how a message can be received and processed using ReceiveAndDelete mode (the default mode).
Learn More
Microsoft Azure PHP Developer Center
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
All versions of azurelib with dependencies
pear/net_url2 Version ^2.2
pear/mail_mime Version ^1.10
firebase/php-jwt Version ^4.0
guzzlehttp/guzzle Version ^7.2
laminas/laminas-mime Version ^2.6
laminas/laminas-mail Version ^2.7
microsoft/azure-storage-queue Version ^1.3
microsoft/azure-storage-blob Version ^1.5
microsoft/azure-storage-table Version ^1.1