HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/my.esfyn.top/vendor/php-di/invoker/src/Exception/NotCallableException.php
<?php declare(strict_types=1);

namespace Invoker\Exception;

/**
 * The given callable is not actually callable.
 */
class NotCallableException extends InvocationException
{
    /**
     * @param mixed $value
     */
    public static function fromInvalidCallable($value, bool $containerEntry = false): self
    {
        if (is_object($value)) {
            $message = sprintf('Instance of %s is not a callable', get_class($value));
        } elseif (is_array($value) && isset($value[0], $value[1])) {
            $class = is_object($value[0]) ? get_class($value[0]) : $value[0];

            $extra = method_exists($class, '__call') || method_exists($class, '__callStatic')
                ? ' A __call() or __callStatic() method exists but magic methods are not supported.'
                : '';

            $message = sprintf('%s::%s() is not a callable.%s', $class, $value[1], $extra);
        } elseif ($containerEntry) {
            $message = var_export($value, true) . ' is neither a callable nor a valid container entry';
        } else {
            $message = var_export($value, true) . ' is not a callable';
        }

        return new self($message);
    }
}