Created
January 4, 2017 04:12
-
-
Save adelowo/dda97d149ea1af1821e025477f962a71 to your computer and use it in GitHub Desktop.
Proposed Interface for gbowo library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Gbowo\Contract\Plugin; | |
use Gbowo\Contract\Adapter\AdapterInterface; | |
interface PluginInterface | |
{ | |
public function getPluginAccessor() : string; | |
public function setAdapter(AdapterInterface $adapter); | |
public function handle(...$args); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2 months after, i am thinking this is a pain.
The enforced
handle
method isn't. The...$args
is the real problem. Having spent the last few hours writing new plugins, doing$args[0]
isn't just neat and the arguments are not really variadic