File manager - Edit - /home/autoph/public_html/projects/tickets-autohub/vendor/livewire/livewire/src/Features/OptimizeRenderedDom.php
Back
<?php namespace Livewire\Features; use Livewire\Livewire; class OptimizeRenderedDom { static function init() { return new static; } protected $htmlHashesByComponent = []; function __construct() { Livewire::listen('component.dehydrate.initial', function ($component, $response) { $response->memo['htmlHash'] = hash('crc32b', $response->effects['html'] ?? ''); }); Livewire::listen('component.hydrate.subsequent', function ($component, $request) { $this->htmlHashesByComponent[$component->id] = $request->memo['htmlHash']; }); Livewire::listen('component.dehydrate.subsequent', function ($component, $response) { $oldHash = $this->htmlHashesByComponent[$component->id] ?? null; $response->memo['htmlHash'] = $newHash = hash('crc32b', $response->effects['html'] ?? ''); if ($oldHash === $newHash) { $response->effects['html'] = null; } }); Livewire::listen('flush-state', function() { $this->htmlHashesByComponent = []; }); } }
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings