public function readTechnicalDatas(MediaVorus $mediavorus)
    {
        if (!$this->is_physically_present()) {
            return [];
        }

        $media = $mediavorus->guess($this->getRealPath());

        $datas = [];

        $techDatas = self::getTechnicalFieldsList();

        foreach ($techDatas as $tc_name => $techData) {
            if (array_key_exists('method', $techData)) {
                if (method_exists($media, $techData['method'])) {
                    $result = call_user_func([$media, $techData['method']]);

                    if (null !== $result) {
                        $datas[$tc_name] = $result;
                    }
                }
            }
        }

        $datas[self::TC_DATA_MIMETYPE] = $media->getFile()->getMimeType();
        $datas[self::TC_DATA_FILESIZE] = $media->getFile()->getSize();

        unset($media);

        return $datas;
    }
public function readTechnicalDatas(MediaVorus $mediavorus)
    {
        if (!$this->is_physically_present()) {
            return [];
        }

        $media = $mediavorus->guess($this->getRealPath());

        $datas = [];

        $techDatas = self::getTechnicalFieldsList();

        foreach ($techDatas as $tc_name => $techData) {
            if (array_key_exists('method', $techData)) {
                if (method_exists($media, $techData['method'])) {
                    $result = call_user_func([$media, $techData['method']]);

                    if (null !== $result) {
                        $datas[$tc_name] = $result;
                    }
                }
            }
        }

        $datas[self::TC_DATA_MIMETYPE] = $media->getFile()->getMimeType();
        $datas[self::TC_DATA_FILESIZE] = $media->getFile()->getSize();

        unset($media);

        return $datas;
    }
public function readTechnicalDatas ( MediaVorus $ mediavorus ) { if ( ! $ this -> is_physically_present ( ) ) { return [ ] ; } $ media = $ mediavorus -> guess ( $ this -> getRealPath ( ) ) ; $ datas = [ ] ; $ techDatas = self :: getTechnicalFieldsList ( ) ; foreach ( $ techDatas as $ tc_name => $ techData ) { if ( array_key_exists ( 'method' , $ techData ) ) { if ( method_exists ( $ media , $ techData [ 'method' ] ) ) { $ result = call_user_func ( [ $ media , $ techData [ 'method' ] ] ) ; if ( null !== $ result ) { $ datas [ $ tc_name ] = $ result ; } } } } $ datas [ self :: TC_DATA_MIMETYPE ] = $ media -> getFile ( ) -> getMimeType ( ) ; $ datas [ self :: TC_DATA_FILESIZE ] = $ media -> getFile ( ) -> getSize ( ) ; unset ( $ media ) ; return $ datas ; }
Read the technical datas of the file.
Returns an empty array for non physical present files

@return array An array of technical datas Key/values
Read the technical datas of the file . Returns an empty array for non physical present files