2017-25 © Pedro Peláez
 

library observable

A observable trait

image

bephp/observable

A observable trait

  • Saturday, May 27, 2017
  • by lloydzhou
  • Repository
  • 1 Watchers
  • 1 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

observable

Build Status Coverage Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

A observable triat for PHP., (*2)

Installation

composer require bephp/observable

API Reference

on($event, $cb)

add event, (*3)

off($event)

remove event, (*4)

trigger()

trigger event, (*5)

Example

class A{
    use Observable;
}
$a = new A();
$a->on('hello', function($name){
    echo 'hello ', $name, '!';
});
$a->trigger('hello', 'lloyd');

this demo will get result:, (*6)

hello lloyd!

The Versions

27/05 2017

dev-master

9999999-dev https://github.com/lloydzhou/observable

A observable trait

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

micro library trait

15/04 2016

v0.1

0.1.0.0 https://github.com/lloydzhou/observable

A observable trait

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

micro library trait