當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BitmapHandler::getLongDesc方法代碼示例

本文整理匯總了PHP中BitmapHandler::getLongDesc方法的典型用法代碼示例。如果您正苦於以下問題:PHP BitmapHandler::getLongDesc方法的具體用法?PHP BitmapHandler::getLongDesc怎麽用?PHP BitmapHandler::getLongDesc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BitmapHandler的用法示例。


在下文中一共展示了BitmapHandler::getLongDesc方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getLongDesc

 function getLongDesc($image)
 {
     global $wgLang;
     $original = parent::getLongDesc($image);
     wfSuppressWarnings();
     $metadata = unserialize($image->getMetadata());
     wfRestoreWarnings();
     if (!$metadata || $metadata['frameCount'] <= 0) {
         return $original;
     }
     $info = array();
     $info[] = $original;
     if ($metadata['loopCount'] == 0) {
         $info[] = wfMsgExt('file-info-png-looped', 'parseinline');
     } elseif ($metadata['loopCount'] > 1) {
         $info[] = wfMsgExt('file-info-png-repeat', 'parseinline', $metadata['loopCount']);
     }
     if ($metadata['frameCount'] > 0) {
         $info[] = wfMsgExt('file-info-png-frames', 'parseinline', $metadata['frameCount']);
     }
     if ($metadata['duration']) {
         $info[] = $wgLang->formatTimePeriod($metadata['duration']);
     }
     return $wgLang->commaList($info);
 }
開發者ID:GodelDesign,項目名稱:Godel,代碼行數:25,代碼來源:PNG.php

示例2: getLongDesc

 function getLongDesc($image)
 {
     global $wgUser, $wgLang;
     $sk = $wgUser->getSkin();
     $metadata = @unserialize($image->getMetadata());
     if (!$metadata) {
         return parent::getLongDesc($image);
     }
     $info = array();
     $info[] = $image->getMimeType();
     $info[] = $sk->formatSize($image->getSize());
     if ($metadata['looped']) {
         $info[] = wfMsgExt('file-info-gif-looped', 'parseinline');
     }
     if ($metadata['frameCount'] > 1) {
         $info[] = wfMsgExt('file-info-gif-frames', 'parseinline', $metadata['frameCount']);
     }
     if ($metadata['duration']) {
         $info[] = $wgLang->formatTimePeriod($metadata['duration']);
     }
     $infoString = $wgLang->commaList($info);
     return "({$infoString})";
 }
開發者ID:amjadtbssm,項目名稱:website,代碼行數:23,代碼來源:GIF.php

示例3: getLongDesc

 /**
  * @param $image File
  * @return string
  */
 function getLongDesc($image)
 {
     global $wgLang;
     $original = parent::getLongDesc($image);
     wfSuppressWarnings();
     $metadata = unserialize($image->getMetadata());
     wfRestoreWarnings();
     if (!$metadata || $metadata['frameCount'] <= 1) {
         return $original;
     }
     /* Preserve original image info string, but strip the last char ')' so we can add even more */
     $info = array();
     $info[] = $original;
     if ($metadata['looped']) {
         $info[] = wfMsgExt('file-info-gif-looped', 'parseinline');
     }
     if ($metadata['frameCount'] > 1) {
         $info[] = wfMsgExt('file-info-gif-frames', 'parseinline', $metadata['frameCount']);
     }
     if ($metadata['duration']) {
         $info[] = $wgLang->formatTimePeriod($metadata['duration']);
     }
     return $wgLang->commaList($info);
 }
開發者ID:Tjorriemorrie,項目名稱:app,代碼行數:28,代碼來源:GIF.php

示例4: getLongDesc

 /**
  * @param File $image
  * @return string
  */
 function getLongDesc($image)
 {
     global $wgLang;
     $original = parent::getLongDesc($image);
     MediaWiki\suppressWarnings();
     $metadata = unserialize($image->getMetadata());
     MediaWiki\restoreWarnings();
     if (!$metadata || $metadata['frameCount'] <= 0) {
         return $original;
     }
     $info = [];
     $info[] = $original;
     if ($metadata['loopCount'] == 0) {
         $info[] = wfMessage('file-info-png-looped')->parse();
     } elseif ($metadata['loopCount'] > 1) {
         $info[] = wfMessage('file-info-png-repeat')->numParams($metadata['loopCount'])->parse();
     }
     if ($metadata['frameCount'] > 0) {
         $info[] = wfMessage('file-info-png-frames')->numParams($metadata['frameCount'])->parse();
     }
     if ($metadata['duration']) {
         $info[] = $wgLang->formatTimePeriod($metadata['duration']);
     }
     return $wgLang->commaList($info);
 }
開發者ID:claudinec,項目名稱:galan-wiki,代碼行數:29,代碼來源:PNG.php

示例5: getLongDesc

 /**
  * @param File $image
  * @return string
  */
 function getLongDesc($image)
 {
     global $wgLang;
     $original = parent::getLongDesc($image);
     MediaWiki\suppressWarnings();
     $metadata = unserialize($image->getMetadata());
     MediaWiki\restoreWarnings();
     if (!$metadata || $metadata['frameCount'] <= 1) {
         return $original;
     }
     /* Preserve original image info string, but strip the last char ')' so we can add even more */
     $info = [];
     $info[] = $original;
     if ($metadata['looped']) {
         $info[] = wfMessage('file-info-gif-looped')->parse();
     }
     if ($metadata['frameCount'] > 1) {
         $info[] = wfMessage('file-info-gif-frames')->numParams($metadata['frameCount'])->parse();
     }
     if ($metadata['duration']) {
         $info[] = $wgLang->formatTimePeriod($metadata['duration']);
     }
     return $wgLang->commaList($info);
 }
開發者ID:claudinec,項目名稱:galan-wiki,代碼行數:28,代碼來源:GIF.php


注:本文中的BitmapHandler::getLongDesc方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。