Skip to content

Commit

Permalink
Update README with new buildCommand() method
Browse files Browse the repository at this point in the history
  • Loading branch information
bcrowe committed Jan 30, 2015
1 parent 5cd0c11 commit ee0f588
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,26 @@ $Growl = new Growl(new GrowlNotifyBuilder('grwl'));

Then, you can set key/value options for a `Builder` to use with the `Growl`
class' `setOption()` or `setOptions()` methods to set option key/value pairs.
After setting options, the last thing to do is `execute()` your built command:
After setting options, the last thing to do is execute your built command:

```php
<?php
$Growl->setOption('title', 'Hello World')
->setOption('message', 'Sup bro?! I\'m all the way turnt up!')
->setOption('sticky', true)
->execute();
->buildCommand();

exec($Growl);

// or...

$Growl->setOptions([
'title' => 'Hello World',
'message' => 'Sup bro?! I\'m all the way turnt up!',
'sticky' => true
])->execute();
])->buildCommand();

exec($Growl);
?>
```

Expand All @@ -113,7 +117,9 @@ $Growl->setOptions([
'open' => 'http://www.google.com'
])
->setEscape(false)
->execute();
->buildCommand();

exec($Growl);

// Set a safe list of option keys. Can be an array of option keys, or a string.
$Growl->setOptions([
Expand All @@ -123,7 +129,9 @@ $Growl->setOptions([
'open' => $definitelySafeURL
])
->setSafe(['subtitle', 'open'])
->execute();
->buildCommand();

exec($Growl);
?>
```

Expand Down

0 comments on commit ee0f588

Please sign in to comment.