public function getDetails(string $filename, array $list): array
    {
        $result = null;
        if ($this->hasEventListeners('beforeGetDetails')) {
            $eventDetails = new \BearFramework\App\Assets\BeforeGetDetailsEventDetails($filename, $list);
            $this->dispatchEvent('beforeGetDetails', $eventDetails);
            $filename = $eventDetails->filename;
            $list = $eventDetails->list;
            if ($eventDetails->returnValue !== null) {
                $result = $eventDetails->returnValue;
            }
        }

        if ($result === null) {
            $result = [];
            $temp = array_flip($list);
            if (isset($temp['mimeType'])) {
                $result['mimeType'] = $this->getMimeType($filename);
            }
            if (isset($temp['width']) || isset($temp['height']) || isset($temp['size'])) {
                $fileExists = is_file($filename);
            }
            if (isset($temp['width']) || isset($temp['height'])) {
                if ($fileExists) {
                    $imageSize = $this->getImageSize($filename);
                }
                if (isset($temp['width'])) {
                    $result['width'] = $fileExists ? $imageSize[0] : null;
                }
                if (isset($temp['height'])) {
                    $result['height'] = $fileExists ? $imageSize[1] : null;
                }
            }
            if (isset($temp['size'])) {
                $result['size'] = $fileExists ? filesize($filename) : null;
            }
        }
        if ($this->hasEventListeners('getDetails')) {
            $eventDetails = new \BearFramework\App\Assets\GetDetailsEventDetails($filename, $list, $result);
            $this->dispatchEvent('getDetails', $eventDetails);
            $result = $eventDetails->returnValue;
        }
        return $result;
    }