dev-master
9999999-devSlack Messenger extension written in Zephir.
The Development Requires
by Nathan Daly
Wallogit.com
2017 © Pedro Peláez
Slack Messenger extension written in Zephir.
Slack Messaging extension written in Zephir., (*2)
, (*3)
Slack is a platform for team communication: everything in one place, instantly searchable, available wherever you go. You can find out more about Slack here., (*4)
Grab the latest extension from here and place it in the following directory:, (*5)
/usr/lib/php5/20.../zephlack.so, (*6)
/usr/lib64/php/modules/zephlack.so, (*7)
Add extension to your php configuration:, (*8)
extension=zephlack.so
(Zephir installation required for this option. Instructions can be found here), (*9)
git clone --depth=1 --branch=master https://github.com/linxlad/zephlack.git cd zephlack zephir build
Add extension to your php configuration:, (*10)
extension=zephlack.so
Finally restart your web server., (*11)
$client = new Zephlack\Client('team', 'token');
$message = new Zephlack\Message\Message('This year you are on the good list');
$message->setChannel('#channel');
$message->setIconEmoji(':santa:');
$message->setUsername('Mr Claus');
$client->setDebug(false);
/* WIll return bool or if debug is enabled will return the payload and response */
$client->notify($message);
$client = new Zephlack\Client('team', 'token');
$message = new Zephlack\Message\Message('This year you are on the good list');
$attachment = new Zephlack\Message\MessageAttachment();
$field = new Zephlack\Message\MessageField();
$field
->setTitle('foo')
->setValue('bar');
$attachment->addField($field);
$message->addAttachment($attachment);
$message->setChannel('#channel');
$message->setIconEmoji(':santa:');
$message->setUsername('Mr Claus');
$client->notify($message);
If your message contain @username and you want him to be notified, add $message->enableLinkNames(true), (*12)
I would like to credit:, (*13)
Polem for the leg work on slack-notifier which this is based. Great PHP slack messaging package which can be found here slack-notifier., (*14)
Nirlah for the http utility that saved me hours of work. Again a great Zephir based package which can be found here Toolbelt., (*15)
Slack Messenger extension written in Zephir.