@@ 779-783 (lines=5) @@ | ||
776 | } elseif ($callableOrMethodStr instanceof \Closure) { |
|
777 | $callableRefl = new \ReflectionFunction($callableOrMethodStr); |
|
778 | $executableStruct = [$callableRefl, null]; |
|
779 | } elseif (is_object($callableOrMethodStr) && is_callable($callableOrMethodStr)) { |
|
780 | $invocationObj = $callableOrMethodStr; |
|
781 | $callableRefl = $this->reflector->getMethod($invocationObj, '__invoke'); |
|
782 | $executableStruct = [$callableRefl, $invocationObj]; |
|
783 | } elseif (is_array($callableOrMethodStr) |
|
784 | && isset($callableOrMethodStr[0], $callableOrMethodStr[1]) |
|
785 | && count($callableOrMethodStr) === 2 |
|
786 | ) { |
|
@@ 809-813 (lines=5) @@ | ||
806 | if (function_exists($stringExecutable)) { |
|
807 | $callableRefl = $this->reflector->getFunction($stringExecutable); |
|
808 | $executableStruct = [$callableRefl, null]; |
|
809 | } elseif (method_exists($stringExecutable, '__invoke')) { |
|
810 | $invocationObj = $this->make($stringExecutable); |
|
811 | $callableRefl = $this->reflector->getMethod($invocationObj, '__invoke'); |
|
812 | $executableStruct = [$callableRefl, $invocationObj]; |
|
813 | } elseif (strpos($stringExecutable, '::') !== false) { |
|
814 | list($class, $method) = explode('::', $stringExecutable, 2); |
|
815 | $executableStruct = $this->buildStringClassMethodCallable($class, $method); |
|
816 | } else { |