HTML_Progress2
[ class tree: HTML_Progress2 ] [ index: HTML_Progress2 ] [ all elements ]

Class: HTML_Progress2_Upload

Source Location: /HTML_Progress2-2.3.0RC1/Progress2/Upload.php

Class Overview


Backend for AJAX uploading bar.


Author(s):

Version:

  • Release: 2.3.0RC1

Variables

Methods


Child classes:

MyUploadProgressMeterStatus
This class show how to use a custom upload identifier through the query string (see also apc5_upload2.php, HTML_Progress2.requestArgs) and handle progress bar labels values.

Inherited Variables

Inherited Methods


Class Details

[line 35]
Backend for AJAX uploading bar.


[ Top ]


Class Variables

$backend =

[line 48]

Backend identifier are either :

'none' - if nothing else below match 'apc5' - APC php extension with PHP5.2.0 or greater 'upm4' - upload progress meter php extension with PHP4 'upm5' - upload progress meter php extension with PHP5.2.0 or greater

  • Since: 2.3.0RC1
  • Access: public

Type:   string


[ Top ]

$format =

[line 64]

Formatted strings for Progress bar labels that will display upload info.

Each conversion specification consists of a percent sign (%), followed by one or more of these elements. T - for display total file size C - for display current file size uploaded P - for display percentage of file size uploaded


Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 75]

HTML_Progress2_Upload __construct( [string $format = null])

Constructor (ZE2) Summary

Parameters:

string   $format   —  (optional) conversion specifications for all progress bar labels

[ Top ]

formatBytes   [line 230]

string formatBytes( int $x)

Function to convert bytes to something larger
  • Since: 2.3.0RC1
  • Access: public

Parameters:

int   $x   —  file size in bytes

[ Top ]

getInfo   [line 105]

bool|array getInfo( string $Id)

Return hash of data with current file upload information, depending of backend used.
  • Return: false if info unavailable, hash of data otherwise
  • Since: 2.3.0RC1
  • Access: public

Parameters:

string   $Id   —  upload identifier

[ Top ]

getStatus   [line 198]

array getStatus( [string $uplId = null])

Get the status of an upload passed in
  • Since: 2.3.0RC1
  • Access: public

Overridden in child classes as:

MyUploadProgressMeterStatus::getStatus()

Parameters:

string   $uplId   —  upload identifier

[ Top ]

sprintf   [line 164]

bool|string sprintf( string $format, array $info)

Return a formatted string with current upload information

Each conversion specification consists of a percent sign (%), followed by one or more of these elements. T - for display total file size C - for display current file size uploaded P - for display percentage of file size uploaded

  • Return: false on error, formatted string with current info
  • Since: 2.3.0RC1
  • Access: public

Parameters:

string   $format   —  conversion specification
array   $info   —  current upload information

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:56:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.