Skip to content

Commit 56d17a4

Browse files
committed
Update README to include execute() method
1 parent b4d0f93 commit 56d17a4

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,14 @@ $Growl = new Growl(new GrowlNotifyBuilder('/usr/local/bin/growlnotify'));
8383
Then, you can set key/value options for a `Builder` to use with the `Growl`
8484
class' `setOption()` or `setOptions()` methods to set option key/value pairs.
8585
After setting options, the last thing to do is build the command with
86-
`buildCommand()`, and execute it:
86+
`buildCommand()` or run it with `execute()`:
8787

8888
```php
8989
<?php
9090
$Growl->setOption('title', 'Hello World')
9191
->setOption('message', 'Sup bro?! I\'m all the way turnt up!')
9292
->setOption('sticky', true)
93-
->buildCommand();
94-
95-
exec($Growl);
93+
->execute();
9694

9795
// or...
9896

@@ -123,9 +121,7 @@ $Growl->setOptions([
123121
'open' => 'http://www.google.com'
124122
])
125123
->setEscape(false)
126-
->buildCommand();
127-
128-
exec($Growl);
124+
->execute();
129125

130126
// Set a safe list of option keys. Can be an array of option keys, or a string.
131127
$Growl->setOptions([
@@ -135,9 +131,7 @@ $Growl->setOptions([
135131
'open' => $definitelySafeURL
136132
])
137133
->setSafe(['subtitle', 'open'])
138-
->buildCommand();
139-
140-
exec($Growl);
134+
->execute();
141135
?>
142136
```
143137

0 commit comments

Comments
 (0)