2017 © Pedro Peláez
 

library notify

Framework agnostic PHP library to simplify interact with common messaging platforms.

image

mvaliolahi/notify

Framework agnostic PHP library to simplify interact with common messaging platforms.

  • Sunday, March 4, 2018
  • by mvaliolahi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Notify

Framework agnostic PHP library to simplify interact with common messaging platforms, but Slack for now!, (*1)

Install

composer require mvaliolahi/notify

Getting start

$notify = new Notify(new SlackDriver([
    'web_hook' => 'your slack web-hook'
]));

$notify->send((new Slack)->text('Hello World!'));

Develop Guide

What is a bot? / How can i create a new one?

Bot is a definition for any class that implements Mvaliolahi\Notify\Contracts\Bot, bot can interact with user to collect all necessary information to pass into $notify->send() method., (*2)

when bots passed to $notify->send(), the notify object is able to send this information to any messaging platform, obviously using specified Driver., (*3)

What is driver? / How can i implement it for other platforms?

Driver is a class that implements Mvaliolahi\Notify\Contracts\Driver, the only responsibility of driver is fetching essential data from $bot object, and implement related logic to send through messaging-platform., (*4)

it is clear enough that$notify->send() is just a wrapper around driver execute() method., (*5)

Slack Bot

The code shows you everything :), (*6)

(new Slack)
->text('Normal text')
->format()->pre('text') // like <pre> tag in html
->format()->bold('Bold text.')
->format()->italic('Italic text.')
->format()->blockQuotes('Italic text.')
->format()->strikeThrough('Italic text.')
->format()->code('<p> The only thing we need is just words.</p>')

The Versions

04/03 2018

dev-master

9999999-dev https://mvaliolahi.ir

Framework agnostic PHP library to simplify interact with common messaging platforms.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Meysam Valiolahi

notification slack notification

04/03 2018

v0.0.1

0.0.1.0 https://mvaliolahi.ir

Framework agnostic PHP library to simplify interact with common messaging platforms.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Meysam Valiolahi

notification slack notification