File ManagerCurrent Directory: wp-content/plugins/wp-migrate-db/vendor/php-di/invoker/src/ReflectionLinux appserver-0d5e4f1e-php-cc8da225320a42ba9b7d66cba40b1f03 6.6.123+ #1 SMP PREEMPT_DYNAMIC Wed Mar 11 09:04:28 UTC 2026 x86_64Edit File: CallableReflection.php <?php namespace DeliciousBrains\WPMDB\Container\Invoker\Reflection; use DeliciousBrains\WPMDB\Container\Invoker\Exception\NotCallableException; /** * Create a reflection object from a callable. * * @author Matthieu Napoli <matthieu@mnapoli.fr> */ class CallableReflection { /** * @param callable $callable * * @return \ReflectionFunctionAbstract * * @throws NotCallableException * * TODO Use the `callable` type-hint once support for PHP 5.4 and up. */ public static function create($callable) { // Closure if ($callable instanceof \Closure) { return new \ReflectionFunction($callable); } // Array callable if (\is_array($callable)) { list($class, $method) = $callable; if (!\method_exists($class, $method)) { throw NotCallableException::fromInvalidCallable($callable); } return new \ReflectionMethod($class, $method); } // Callable object (i.e. implementing __invoke()) if (\is_object($callable) && \method_exists($callable, '__invoke')) { return new \ReflectionMethod($callable, '__invoke'); } // Callable class (i.e. implementing __invoke()) if (\is_string($callable) && \class_exists($callable) && \method_exists($callable, '__invoke')) { return new \ReflectionMethod($callable, '__invoke'); } // Standard function if (\is_string($callable) && \function_exists($callable)) { return new \ReflectionFunction($callable); } throw new NotCallableException(\sprintf('%s is not a callable', \is_string($callable) ? $callable : 'Instance of ' . \get_class($callable))); } } Upload File Directory Listing NameTypeSizeActions.. (Parent Directory)DirCallableReflection.phpFile1.73 KB Rename | Delete | Edit