FormatFileSize() 공개 정적인 메소드

Get human readable filesize
public static FormatFileSize ( integer $size ) : string
$size integer
리턴 string
예제 #1
0
 /**
  * Process db row
  * @param array $row
  * @return array
  */
 public function processRow(array $row)
 {
     global $ADMIN;
     // edit link
     $row['file_name'] = sprintf('<a href="/%s/media-archive/edit-attachment.php?f_attachment_id=%d">%s</a>', $ADMIN, $row['id'], $row['file_name']);
     // human readable size
     $row['size_in_bytes'] = parent::FormatFileSize($row['size_in_bytes']);
     // yes/no disposition
     $row['content_disposition'] = empty($row['content_disposition']) ? getGS('Yes') : getGS('No');
     // get in use info
     $object = new Attachment($row['id']);
     $row['InUse'] = (int) $object->inUse();
     return array_values($row);
 }