You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+25-11
Original file line number
Diff line number
Diff line change
@@ -12,16 +12,30 @@ This wrapper lets you interact with Clockwork without the hassle of having to cr
12
12
13
13
## Usage
14
14
15
-
Require the Clockwork library:
15
+
### Installing with composer
16
+
The easiest way to get Clockwork is to use [Composer][4] to automatically download and include it in your project. Setup [Composer][4] and add us to your composer.json
17
+
```php
18
+
{
19
+
"require": {
20
+
"mediaburst/clockworksms": "2.0.*"
21
+
}
22
+
}
23
+
```
24
+
If you are using your own autoloader we are using the PSR-4 namespacing scheme.
25
+
26
+
### Including directly
27
+
28
+
Download the Clockwork library, put it in your project and require the Clockwork class and the ClockworkException classes:
16
29
17
30
```php
18
-
require 'class-Clockwork.php';
31
+
require 'src/Clockwork.php';
32
+
require 'src/ClockworkException.php';
19
33
```
20
34
21
35
### Sending a message
22
36
23
37
```php
24
-
$clockwork = new Clockwork( $API_KEY ); //Be careful not to post your API Keys to public repositories.
38
+
$clockwork = new mediaburst\ClockworkSMS\Clockwork( $API_KEY ); //Be careful not to post your API Keys to public repositories.
25
39
$message = array( 'to' => '441234567891', 'message' => 'This is a test!' );
0 commit comments