AloFramework documentation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • Alo
    • Cache
    • CLI
    • Controller
    • Db
    • Exception
    • FileSystem
    • Session
    • Validators
    • Windows
  • Controller
  • None
  • PHP

Classes

  • Downloader
  • IO

Class Downloader

Downloads an external resource to disk, echoing the progress

Namespace:Alo\CLI
Author:Art <a.molcanovas@gmail.com>
Located atsys/class/alo/cli/downloader.php

Methods summary

public
#__construct(string$source,string$destination)

Instantiates the class

Instantiates the class

Parameters

$source
string
$source Download source
$destination
string
$destination Download destination

Author

Art <a.molcanovas@gmail.com>
public
#progressFunction(resource$resource,integer$downloadSize,integer$downloaded,integer$uploadSize,integer$uploaded)

The progress function

The progress function

Parameters

$resource
resource
$resource Coulsn't find documentation on this one, most likely the curl resource
$downloadSize
integer
$downloadSize How much we are downloading
$downloaded
integer
$downloaded How much we have downloaded
$uploadSize
integer
$uploadSize How much we are uploading
$uploaded
integer
$uploaded How much we have uploaded

Author

Art <a.molcanovas@gmail.com>
public boolean
#download( )

Starts the download

Starts the download

Returns

boolean
Whther the download was successful (on the Curl side)

Author

Art <a.molcanovas@gmail.com>

Magic methods summary

Properties summary

public staticAlo\CLI\Downloader$this
#

Static reference to the last instance of the class

Static reference to the last instance of the class

protectedAlo\Curl$curl
#

Curl handler

Curl handler

protected string$dest
#

Download destination

Download destination

protected integer$lastReportTime
#

Timestamp when we last reported the status

Timestamp when we last reported the status

protected string$lastReportStatus
#

The last reported status

The last reported status

protected resource$fp
#

Output

Output

protected integer$reportCount
#

Number of times the status has been reported

Number of times the status has been reported

AloFramework documentation API documentation generated byApiGen 2.8.0