{"id":13669378,"url":"https://github.com/bcrowe/growl","last_synced_at":"2025-03-25T20:31:34.180Z","repository":{"id":20697478,"uuid":"23981064","full_name":"bcrowe/growl","owner":"bcrowe","description":":tiger: Growl Notifications with PHP","archived":false,"fork":false,"pushed_at":"2016-03-12T00:12:57.000Z","size":136,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-07T01:22:40.233Z","etag":null,"topics":["growl","notifications","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcrowe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-13T00:03:07.000Z","updated_at":"2023-07-27T11:53:20.000Z","dependencies_parsed_at":"2022-08-19T22:40:17.610Z","dependency_job_id":null,"html_url":"https://github.com/bcrowe/growl","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcrowe%2Fgrowl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcrowe%2Fgrowl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcrowe%2Fgrowl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcrowe%2Fgrowl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcrowe","download_url":"https://codeload.github.com/bcrowe/growl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222090823,"owners_count":16929472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["growl","notifications","php"],"created_at":"2024-08-02T08:01:11.474Z","updated_at":"2024-10-29T18:19:33.880Z","avatar_url":"https://github.com/bcrowe.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Growl Notifications with PHP\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Build Status][ico-travis]][link-travis]\n[![Coverage Status][ico-scrutinizer]][link-scrutinizer]\n[![Quality Score][ico-code-quality]][link-code-quality]\n[![Total Downloads][ico-downloads]][link-downloads]\n\nThis package aims to provide an easy and fluent interface to construct and\nexecute commands for various desktop notification programs.\n\n## Requirements\n\nPHP 5.4+ and one of the following notification programs:\n\n### OS X\n\n#### Growl \u0026 GrowlNotify\n\n* [Growl](http://growl.info/downloads)\n* [GrowlNotify](http://growl.info/downloads#generaldownloads)\n\n#### terminal-notifier\n\n```bash\n$ gem install terminal-notifier\n$ brew install terminal-notifier\n```\n\n### Linux\n\n#### notify-send\n\n``` bash\n$ apt-get install libnotify-bin\n$ yum install libnotify\n```\n\n### Windows\n\n#### Growl \u0026 GrowlNotify\n\n* [Growl](http://www.growlforwindows.com/gfw/default.aspx)\n* [GrowlNotify](http://www.growlforwindows.com/gfw/help/growlnotify.aspx)\n\n## Installation\n\n### Composer\n\n``` bash\n$ composer require bcrowe/growl\n```\n\n## Usage\n\nCreate a new instance of the `Growl` class. You can optionally supply a\n`Builder` class and its path if you don't wish for the package to choose\na notification program based on your system:\n\n```php\n\u003c?php\nuse BryanCrowe\\Growl\\Growl;\n\n$Growl = new Growl;\n\n// Or...\n\nuse BryanCrowe\\Growl\\Growl;\nuse BryanCrowe\\Growl\\Builder\\GrowlNotifyBuilder;\n\n$Growl = new Growl(new GrowlNotifyBuilder('/usr/local/bin/growlnotify'));\n?\u003e\n```\n\nNow, you can set key/value options for a `Builder` to use with the `setOption()`\nor `setOptions()` methods. After setting options, the last thing to do is build\nthe command with `buildCommand()` or run it with `execute()`:\n\n```php\n\u003c?php\n(new Growl)\n    -\u003esetOption('title', 'Hello World')\n    -\u003esetOption('message', 'How are you doing?')\n    -\u003esetOption('sticky', true)\n    -\u003eexecute();\n\n// Or...\n\n$Growl = new Growl;\n$Growl-\u003esetOptions([\n        'title' =\u003e 'Hello World',\n        'message' =\u003e 'How are you doing?',\n        'sticky' =\u003e true\n    ])\n    -\u003ebuildCommand();\n\nexec($Growl);\n?\u003e\n```\n\nBy default, this package will escape all command arguments that are supplied as\noptions. If you want to change this, there are two options. Either completely\ndisable escaping, or provide a safe-list of option keys that will be bypassed\nwhile escaping is enabled.\n\n```php\n\u003c?php\n// Completely disable escaping...\n(new Growl)\n    -\u003esetOptions([\n        'title' =\u003e 'Hello World',\n        'message' =\u003e 'How are you doing?',\n        'url' =\u003e 'http://www.google.com'\n    ])\n    -\u003esetEscape(false)\n    -\u003eexecute();\n\n// Set a safe-list of option keys. Can be an array of option keys, or a string.\n(new Growl)\n    -\u003esetOptions([\n        'title' =\u003e 'Hello World',\n        'message' =\u003e $mySafeMessage,\n        'url' =\u003e $mySafeURL\n    ])\n    -\u003esetSafe(['message', 'url'])\n    -\u003eexecute();\n?\u003e\n```\n\n### Builders\n\n#### GrowlNotifyBuilder \u0026 GrowlNotifyWindowsBuilder\n\nBuilds commands for `growlnotify`.\n\nAvailable option keys:\n\n* **title** *string* The title of the growl.\n* **message** *string* The growl's body.\n* **sticky** *boolean* Whether or not make the growl stick until closed.\n* **image** *string* A name of an application's icon to use, e.g., \"Mail\"\n*(OS X only)*, the path to a file on the system *(OS X \u0026 Windows)*, or a URL to\nan image *(Windows only)*.\n* **url** *string* A URL to open if the growl is clicked.\n\n#### TerminalNotifierBuilder\n\nBuilds commands for `terminal-notifier`.\n\nAvailable option keys:\n\n* **title** *string* The title of the notification.\n* **subtitle** *string* The notification's subtitle.\n* **message** *string* The notification's body.\n* **image** *string* A URL to an image to be used as the icon.\n*(OS X Mavericks+ only)*\n* **contentImage** *string* A URL to an image to be in the notification body.\n*(OS X Mavericks+ only)*\n* **url** *string* A URL to go to when the notification is clicked.\n\n#### NotifySendBuilder\n\nBuilds commands for `notify-send`.\n\nAvailable option keys:\n\n* **title** *string* The title of the notification.\n* **message** *string* The notification's body.\n* **sticky** *boolean* Whether or not make the notification stick until closed.\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed\nrecently.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email bryan@bryan-crowe.com\ninstead of using the issue tracker.\n\n## Credits\n\n- [Bryan Crowe][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more\ninformation.\n\n[ico-version]: https://img.shields.io/packagist/v/bcrowe/growl.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/bcrowe/growl/master.svg?style=flat-square\n[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/bcrowe/growl.svg?style=flat-square\n[ico-code-quality]: https://img.shields.io/scrutinizer/g/bcrowe/growl.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/bcrowe/growl.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/bcrowe/growl\n[link-travis]: https://travis-ci.org/bcrowe/growl\n[link-scrutinizer]: https://scrutinizer-ci.com/g/bcrowe/growl/code-structure\n[link-code-quality]: https://scrutinizer-ci.com/g/bcrowe/growl\n[link-downloads]: https://packagist.org/packages/bcrowe/growl\n[link-author]: https://github.com/bcrowe\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcrowe%2Fgrowl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcrowe%2Fgrowl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcrowe%2Fgrowl/lists"}