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;
    }
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;
    }
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 ; }
Returns a list of details for the filename specified.

@param string $filename The filename of the asset.
@param array $list A list of details to return. Available values: mimeType, size, width, height.
@return array A list of tails for the filename specified.
Returns a list of details for the filename specified .