PHPackages                             mjerwin/clockwork-sms - 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. mjerwin/clockwork-sms

ActiveLibrary

mjerwin/clockwork-sms
=====================

A PHP wrapper for Clockwork SMS API

0.9.2(10y ago)19.4k↓50%1[1 PRs](https://github.com/mjerwin/clockwork-sms/pulls)1MITPHPPHP &gt;=5.3

Since Dec 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mjerwin/clockwork-sms)[ Packagist](https://packagist.org/packages/mjerwin/clockwork-sms)[ Docs](https://github.com/mjerwin/clockwork-sms)[ RSS](/packages/mjerwin-clockwork-sms/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (1)

clockwork-sms
=============

[](#clockwork-sms)

A framework agnostic PHP wrapper for clockwork SMS API

Requirements:

- A [Clockwork](http://clockworksms.com) account with API Key

\##Installation Add the following to you `composer.json` file:

```
"require": {
    "mjerwin/clockwork-sms": "~0.9",
},
```

Then run:

```
php composer.phar update
```

Alternatively, run the following command:

```
php composer.phar require mjerwin/clockwork-sms:~0.9
```

\##Usage

\###Get Account Balance

```
const CLOCKWORK_API_KEY = 'abcdefghijklmnopqrstuvwxyz1234567890';

$client = new \MJErwin\Clockwork\ClockworkClient(CLOCKWORK_API_KEY);

$balance = $client->getBalance();
```

\###Sending a Message

```
const CLOCKWORK_API_KEY = 'abcdefghijklmnopqrstuvwxyz1234567890';

$message = new \MJErwin\Clockwork\Message();
$message->setNumber('07700900123');
$message->setContent('Check out this message!');

$client = new \MJErwin\Clockwork\ClockworkClient(CLOCKWORK_API_KEY);

$response = $client->sendMessage($message);
```

The `sendMessage()` method returns an instance of `\MJErwin\Clockwork\MessageResponse()`.

You can use the following methods to get information from the response

- `getTo()`
- `getMessageId()`
- `getErrorCode()`
- `getErrorDescription()`

\###Options When sending a message, there are a number of optional parameters that can be given:

```
// Set the name the message will be from
$message->setFromName('MJErwin');

// Set if truncating is enabled. If true, messages that are too big will be truncated
$client->setTruncateEnabled(true);

// Set the action taken if the message contains invalid chars.
$client->setInvalidCharAction(ClockworkClient::INVALID_CHAR_ACTION_RETURN_ERROR);
```

Class constants are provided for the values 1-3 for `setInvalidCharAction()` and are as follows:

ValueConstantDescription1`\MJErwin\Clockwork\ClockworkClient::INVALID_CHAR_ACTION_RETURN_ERROR`Return an error2`\MJErwin\Clockwork\ClockworkClient::INVALID_CHAR_ACTION_REMOVE_CHARS`Remove the invalid characters3`\MJErwin\Clockwork\ClockworkClient::INVALID_CHAR_ACTION_REPLACE_CHARS`Replace invalid characters where possible, remove the restSee  for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.7% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~252 days

Total

3

Last Release

3680d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/849c28cb8214d4e19aecf43cc6271eb37fd09f13e4ae6d671a0092aa2238bbc9?d=identicon)[mjerwin](/maintainers/mjerwin)

---

Top Contributors

[![mjerwin](https://avatars.githubusercontent.com/u/3004369?v=4)](https://github.com/mjerwin "mjerwin (8 commits)")[![RossCasey](https://avatars.githubusercontent.com/u/5801841?v=4)](https://github.com/RossCasey "RossCasey (3 commits)")

### Embed Badge

![Health badge](/badges/mjerwin-clockwork-sms/health.svg)

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

###  Alternatives

[paynl/sdk

401.5M11](/packages/paynl-sdk)[allyans3/steam-market-api-v2

Steam Market API v2

1937.3k](/packages/allyans3-steam-market-api-v2)[cristal/php-api-wrapper

Work with APIs like with Laravel Eloquent or Doctrine (no longer a dream)

12594.9k](/packages/cristal-php-api-wrapper)[chapter-three/apple-news-api

Push content to Apple News.

38307.5k3](/packages/chapter-three-apple-news-api)[labs64/netlicensingclient-php

PHP wrapper for Labs64 NetLicensing RESTful API

1450.4k1](/packages/labs64-netlicensingclient-php)[zephir/kirby-contentsync

Kirby contentsync plugin

543.0k](/packages/zephir-kirby-contentsync)

PHPackages © 2026

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