2017 © Pedro Peláez
 

library hooky

image

mascame/hooky

  • Tuesday, November 1, 2016
  • by marcmascarell
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Hooky

Packagist Travis license, (*1)

Simple hooks., (*2)

Installation

composer require mascame/hooky, (*3)

Usage

MyHook.php, (*4)

class MyHook implements \Mascame\Hooky\HookContract {

    public function handle($data, $next)
    {
        $data = 'test';

        return $next($data);
    }

}

somewhere.php, (*5)


$hook = new \Mascame\Hooky\Hook(); $hookName = 'bar'; $someData = 'foo'; // This will be sent to handlers, where they can manipulate it $hook->to($hookName, [MyHook::class, AnotherHook::class]); $data = $hook->fire($hookName, $someData);

Contributing

Thank you for considering contributing! You can contribute at any time forking the project and making a pull request., (*6)

Support

If you need help or any kind of support, please send an e-mail to Marc Mascarell at marcmascarell@gmail.com., (*7)

License

MIT, (*8)

The Versions

01/11 2016

dev-master

9999999-dev https://github.com/marcmascarell/hooky

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Marc Mascarell

hook hooks

01/11 2016

1.1.0

1.1.0.0 https://github.com/marcmascarell/hooky

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Marc Mascarell

hook hooks

30/10 2016

1.0.0

1.0.0.0 https://github.com/marcmascarell/hooky

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Marc Mascarell

hook hooks