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

Namespaces

  • Alo
    • Cache
    • CLI
    • Controller
    • Db
    • Exception
    • FileSystem
    • Session
    • Statics
    • Test
    • 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 at sys/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 $download_size, integer $downloaded, integer $upload_size, integer $uploaded )

The progress function

The progress function

Parameters

$resource
resource
$resource Coulsn't find documentation on this one, most likely the curl resource
$download_size
integer
$download_size How much we are downloading
$downloaded
integer
$downloaded How much we have downloaded
$upload_size
integer
$upload_size 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

protected Alo\cURL $curl
#

cURL handler

cURL handler

protected string $dest
#

Download destination

Download destination

protected integer $last_report_time
#

Timestamp when we last reported the status

Timestamp when we last reported the status

protected string $last_report_status
#

The last reported status

The last reported status

protected resource $fp
#

Output

Output

protected integer $report_count
#

Number of times the status has been reported

Number of times the status has been reported

AloFramework documentation API documentation generated by ApiGen 2.8.0