🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:RebindsCallbacksToSelf.php
<?php declare(strict_types=1); namespace Illuminate\Support; use Closure; use ReflectionFunction; trait RebindsCallbacksToSelf { /** * Binds the provided callback to the class instance. * * @throws \ReflectionException */ protected function bindCallbackToSelf(Closure $callback): ?Closure { $reflector = new ReflectionFunction($callback); // We only want to rebind anonymous functions. if ($reflector->isAnonymous()) { if ($reflector->isStatic()) { // Static functions are bound without $this. $callback = $callback->bindTo(null, static::class); } else { // Non-static functions are bound to $this. $callback = $callback->bindTo($this, static::class); } } return $callback; } }
Save Changes
Cancel
Create New File
Create New Folder