public function CallbackToken::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php \Prophecy\Argument\Token\CallbackToken::__construct()
Initializes token.
Parameters
callable $callback:
Throws
\Prophecy\Exception\InvalidArgumentException
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ CallbackToken.php, line 32
Class
- CallbackToken
- Callback-verified token.
Namespace
Prophecy\Argument\TokenCode
public function __construct($callback) {
if (!is_callable($callback)) {
throw new InvalidArgumentException(sprintf('Callable expected as an argument to CallbackToken, but got %s.', gettype($callback)));
}
$this->callback = $callback;
}