芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/vendor/sentry/sentry/src/EventHint.php
*/ public $extra = []; /** * Create a EventHint instance from an array of values. * * @psalm-param array{ * exception?: \Throwable|null, * mechanism?: ExceptionMechanism|null, * stacktrace?: Stacktrace|null, * extra?: array
* } $hintData */ public static function fromArray(array $hintData): self { $hint = new self(); $exception = $hintData['exception'] ?? null; $mechanism = $hintData['mechanism'] ?? null; $stacktrace = $hintData['stacktrace'] ?? null; $extra = $hintData['extra'] ?? []; if (null !== $exception && !$exception instanceof \Throwable) { throw new \InvalidArgumentException(sprintf('The value of the "exception" field must be an instance of a class implementing the "%s" interface. Got: "%s".', \Throwable::class, get_debug_type($exception))); } if (null !== $mechanism && !$mechanism instanceof ExceptionMechanism) { throw new \InvalidArgumentException(sprintf('The value of the "mechanism" field must be an instance of the "%s" class. Got: "%s".', ExceptionMechanism::class, get_debug_type($mechanism))); } if (null !== $stacktrace && !$stacktrace instanceof Stacktrace) { throw new \InvalidArgumentException(sprintf('The value of the "stacktrace" field must be an instance of the "%s" class. Got: "%s".', Stacktrace::class, get_debug_type($stacktrace))); } if (!\is_array($extra)) { throw new \InvalidArgumentException(sprintf('The value of the "extra" field must be an array. Got: "%s".', get_debug_type($extra))); } $hint->exception = $exception; $hint->mechanism = $mechanism; $hint->stacktrace = $stacktrace; $hint->extra = $extra; return $hint; } }