@@ 709-713 (lines=5) @@ | ||
706 | } elseif ($callableOrMethodStr instanceof \Closure) { |
|
707 | $callableRefl = new \ReflectionFunction($callableOrMethodStr); |
|
708 | $executableStruct = [$callableRefl, null]; |
|
709 | } elseif (is_object($callableOrMethodStr) && is_callable($callableOrMethodStr)) { |
|
710 | $invocationObj = $callableOrMethodStr; |
|
711 | $callableRefl = $this->reflector->getMethod($invocationObj, '__invoke'); |
|
712 | $executableStruct = [$callableRefl, $invocationObj]; |
|
713 | } elseif (is_array($callableOrMethodStr) |
|
714 | && isset($callableOrMethodStr[0], $callableOrMethodStr[1]) |
|
715 | && count($callableOrMethodStr) === 2 |
|
716 | ) { |
|
@@ 739-743 (lines=5) @@ | ||
736 | if (function_exists($stringExecutable)) { |
|
737 | $callableRefl = $this->reflector->getFunction($stringExecutable); |
|
738 | $executableStruct = [$callableRefl, null]; |
|
739 | } elseif (method_exists($stringExecutable, '__invoke')) { |
|
740 | $invocationObj = $this->make($stringExecutable); |
|
741 | $callableRefl = $this->reflector->getMethod($invocationObj, '__invoke'); |
|
742 | $executableStruct = [$callableRefl, $invocationObj]; |
|
743 | } elseif (strpos($stringExecutable, '::') !== false) { |
|
744 | list($class, $method) = explode('::', $stringExecutable, 2); |
|
745 | $executableStruct = $this->buildStringClassMethodCallable($class, $method); |
|
746 | } else { |