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

Class: HTML_Progress2_Upload

Source Location: /HTML_Progress2-2.4.2/HTML/Progress2/Upload.php

Class Overview


Backend for AJAX uploading bar.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2007-2008 Laurent Laville

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 58]
Backend for AJAX uploading bar.


[ Top ]


Class Variables

$backend =

[line 70]

Backend identifier are either :

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

  • Since: 2.3.0RC1
  • Access: public

Type:   string


[ Top ]

$format =

[line 89]

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 F - for display file name to upload E - for estimate time left S - for speed limit


Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 101]

HTML_Progress2_Upload __construct( [string $format = null])

Constructor (ZE2) Summary
  • Link: Patch for PHP 4
  • Since: version 2.3.0RC1 (2007-02-12)
  • Access: protected

Parameters:

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

[ Top ]

formatBytes   [line 276]

string formatBytes( int $x)

Function to convert bytes to something larger
  • Since: version 2.3.0RC1 (2007-02-12)
  • Access: public

Parameters:

int   $x   —  file size in bytes

[ Top ]

getInfo   [line 129]

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: version 2.3.0RC1 (2007-02-12)
  • Access: public

Parameters:

string   $Id   —  upload identifier

[ Top ]

getStatus   [line 243]

array getStatus( [string $uplId = null])

Get the status of an upload passed in
  • Since: version 2.3.0RC1 (2007-02-12)
  • Access: public

Overridden in child classes as:

MyUploadProgressMeterStatus::getStatus()

Parameters:

string   $uplId   —  (optional) upload identifier

[ Top ]

sprintf   [line 188]

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 F - for display file name to upload E - for estimate time left S - for speed limit

  • Return: false on error, formatted string with current info
  • Since: version 2.3.0RC1 (2007-02-12)
  • Access: public

Parameters:

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:46:43 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.