当前位置: 首页>>代码示例>>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;未经允许,请勿转载。