2017 © Pedro Peláez
 

library message

php message client for sending and receiving messages using rest or soap

image

mhndev/message

php message client for sending and receiving messages using rest or soap

  • Monday, April 11, 2016
  • by majidphpdeveloper
  • Repository
  • 2 Watchers
  • 4 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

php message client for sending and receiving messages using rest or soap, (*1)

Installation

Add this package to your composer.json and run composer update. "mhndev/message": "dev-master", (*2)

you can also you this composer command :, (*3)

composer require mhndev/message dev-master

Sample usage


$config = [ 'default'=>'smir', 'providers'=>[ 'smsir'=>[ 'adapter'=> \mhndev\message\providers\smsir\adapters\SoapAdapter::class, 'address'=>'http://n.sms.ir/ws/SendReceive.asmx?wsdl', 'meta'=>[ 'baseLine'=>'yourBaseLine', ], 'credentials'=>[ 'username'=>'yourUserName', 'password'=>'yourPassword' ] ], 'magfa'=>[ 'address'=>'http://sms.magfa.com/magfaHttpService', 'adapter'=> \mhndev\message\providers\smsir\adapters\RestAdapter::class, 'meta'=>[ 'baseLine'=> '3000565758', 'lines'=>[ '3000565758' ] ], 'credentials'=>[ 'domain'=>'magfa', 'username'=> 'mabna_00068', 'password'=> '7#2@SmgqirDGIR4c', 'panel_password'=>'a3eilm2s2y20#', ], ] ] ]; $client = new \mhndev\message\Client($config); $client->send('09395410440', 'salam');

consider that for creating client object you should pass an configuration array as above. you can store your configuration file in your application and pass it to client object., (*4)

Providers

each adapter is related to a specific message service. you can have multiple service providers and specify default service in you config file., (*5)

if you want to use specific service you can pass the adapter object in client object but it's optional so if you don't pass adapter object as an argument for client constructor it would use default adapter., (*6)

even you can create your own provider class and extend the configuration file for your class., (*7)

for now this package support following sms senders :
sms.ir
magfa
, (*8)

Adapters

each provider can have multiple adapter . for example you can connect to magfa and send sms by soap adapter or rest adapter or even json rpc call just if you have received the permission from magfa., (*9)

The Versions

11/04 2016

dev-master

9999999-dev

php message client for sending and receiving messages using rest or soap

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

11/04 2016

dev-devel

dev-devel

php message client for sending and receiving messages using rest or soap

  Sources   Download

MIT

The Requires

  • php >=5.4.0