public function forwards($arguments = array(), $prefixSelf = null, $suffixArgumentsObject = false, $suffixArguments = true)
{
if (null === $prefixSelf) {
if ($this->callback instanceof WrappedCustomMethod) {
$parameters = $this->invocableInspector->callbackReflector($this->callback->customCallback())->getParameters();
} else {
$parameters = $this->invocableInspector->callbackReflector($this->callback)->getParameters();
}
$prefixSelf = $parameters && 'phonySelf' === $parameters[0]->getName();
}
$invoker = $this->invoker;
$callback = $this->callback;
if (!$arguments instanceof Arguments) {
$arguments = new Arguments($arguments);
}
return $this->doesWith(function ($self, $incoming) use($invoker, $callback, $arguments, $prefixSelf, $suffixArgumentsObject, $suffixArguments) {
$request = new CallRequest($callback, $arguments, $prefixSelf, $suffixArgumentsObject, $suffixArguments);
$finalArguments = $request->finalArguments($self, $incoming);
return $invoker->callWith($callback, $finalArguments);
}, array(), true, true, false);
}