Barryvdh\Debugbar\DataCollector\QueryCollector::findViewFromHash PHP Méthode

findViewFromHash() protected méthode

Find the template name from the hash.
protected findViewFromHash ( string $hash ) : null | string
$hash string
Résultat null | string
    protected function findViewFromHash($hash)
    {
        $finder = app('view')->getFinder();
        if (isset($this->reflection['viewfinderViews'])) {
            $property = $this->reflection['viewfinderViews'];
        } else {
            $reflection = new \ReflectionClass($finder);
            $property = $reflection->getProperty('views');
            $property->setAccessible(true);
            $this->reflection['viewfinderViews'] = $property;
        }
        foreach ($property->getValue($finder) as $name => $path) {
            if (sha1($path) == $hash || md5($path) == $hash) {
                return $name;
            }
        }
    }