ircmaxell/Protocol-Lib — pull request #2 by jsor (2013-07-26 10:52:38+00:00)
Title: Revamp ProtocolLib

The intention was to implement #1, it's a little bit more now. I hope that's ok...

------------

#### Moved method related logic into its own class ProtocolMethodWrapper which can be also used standalone

Examples:
```php
$protocol = new ProtocolLib\ProtocolMethodWrapper('Interface::method');

$protocol->doesMethodImplement('Class::method');
// or
$protocol->doesMethodImplement(['Class', 'method']);
// or
$protocol->doesMethodImplement([$object, 'method']);
```

You can also obtain a method wrapper from the parent interface wrapper
```php
$protocol = (new ProtocolLib\ProtocolMethodWrapper('Interface'))->getMethodProtocol('method');
```
------------

#### Added ProtocolMethodWrapper::doesFunctionImplement for checking if a function implements a specific interface method

Examples:
```php
$protocol = new ProtocolLib\ProtocolMethodWrapper('Interface::method');

$protocol->doesFunctionImplement('function_name');
// or
$protocol->doesFunctionImplement(function (...) {
});
```
------------

#### Heavily improved method/function parameter checks (ProtocolMethodWrapper::checkParam)

https://github.com/ircmaxell/Protocol-Lib/blob/function-implement/src/ProtocolLib/ProtocolMethodWrapper.php#L82-L158

------------

#### Added a LogicException class under the ProtocolLib namespace