PHPackages                             poirot/sms-clients - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. poirot/sms-clients

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

poirot/sms-clients
==================

SMS Abstraction; Implementing Iranian SMS Service Providers; \[persian sms, iran sms, magfa\].

01301PHP

Since May 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/phPoirot/SmsClients)[ Packagist](https://packagist.org/packages/poirot/sms-clients)[ RSS](/packages/poirot-sms-clients/feed)WikiDiscussions devel Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Sms API Clients And Poirot Sms Module
=====================================

[](#sms-api-clients-and-poirot-sms-module)

SMS Abstraction; Implementing Iranian SMS Service Providers.

- One Abstraction Interface, Many Providers
- Entity Model For SMS Message Has To Be Sent And Sent Message
- Sent Message Is Serializable Include Receptors and Contributor Number
- Good Object Oriented Design Achieve Ability To Use Multiple Platform (rest, soap, ..) For Each Provider
- Simple Usage And Easy To Understand
- Can Be Used in Poirot Module Ecosystem

Poirot Module
=============

[](#poirot-module)

Configuration Settings
----------------------

[](#configuration-settings)

```
return [
    \Module\SmsClients\Module::CONF_KEY =>
    [
        \Module\SmsClients\Services\ServiceSmsClient::CONF_CLIENT => [
            // 'service' => '/Registered/ServiceName'
            // 'service' => iClientOfSms
               // instance() let ioc to inject dependencies if required
               'service' => new \Poirot\Ioc\instance(
                   \Poirot\Sms\Driver\KavehNegar\Sms::class
                   , [
                       'api_key'  => 'your_api_key',
                       'platform' => new \Poirot\Ioc\instance(
                           \Poirot\Sms\Driver\KavehNegar\Rest\PlatformRest::class
                       )
                   ]
               ),
        ],
    ],
];
```

Usage
-----

[](#usage)

```
// Every Where In Project

$sentSms = \Module\SmsClients\Services\IOC::Sms()->sendTo(...)
```

Providers
---------

[](#providers)

### Kaveh Negar

[](#kaveh-negar)

```
$sms = new Poirot\Sms\Driver\KavehNegar\Sms([
    'api_key'     => 'your_api_key',
    'sender_line' => '10007770070777'
]);

try {
    $sentMessage = $sms->sendTo(['0935xxxxxxx'], new SMSMessage('Hello ...'));
} catch (exAuthNoCredit $e) {
    // There is no left credit
    echo '﷼'.$sms->getRemainCredit();
    die();
}

// unique message id
$messageId = $sentMessage->getUid();

if ($sentMessage->getStatus() === $sentMessage::STATUS_BANNED)
    die('User Has Banned SMS Messaging!!');

if ($sentMessage->getStatus() === $sentMessage::STATUS_FAILED)
    die('SMS Sent Successfuly But Failed Sending From Telecommunication!!');

// Sent Message is Serializable And Can Be Stored
$myPersitence->store($sentMessage);

// Later We Can Check The Status Of Message
$sentMessage = $sms->getSentMessageWithId($messageId);
```

Exceptions
----------

[](#exceptions)

- exAuthentication
- exAuthNoCredit
- exMessageMalformed
- exServerBan
- exServerError

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f784f9dfb58e36b6a876f3057e5664bb904af71d30bb2023583118138dffe9a?d=identicon)[Payam](/maintainers/Payam)

---

Tags

sms-client

### Embed Badge

![Health badge](/badges/poirot-sms-clients/health.svg)

```
[![Health](https://phpackages.com/badges/poirot-sms-clients/health.svg)](https://phpackages.com/packages/poirot-sms-clients)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
