Class AdmintoolsHelperDownload

Description

Smart download helper. Automatically uses cURL or URL fopen() wrappers to fetch the package.

  • since: 2.5.4

Located in /administrator/components/com_joomlaupdate/helpers/download.php (line 19)


	
			
Method Summary
static boolean chmod (string $path, int $mode)
static bool download (string $url, string $target)
static mixed downloadAndReturn (string $url)
static array getAdapters ()
static bool|string &getCURL (string $url, [resource $fp = null], [boolean $nofollow = false])
static bool|string &getFOPEN (string $url, [resource $fp = null])
static bool hasCURL ()
static bool hasFOPEN ()
Methods
static method chmod (line 398)

Change the permissions of a file, optionally using FTP

  • return: True on success
  • since: 2.5.4
  • access: private
static boolean chmod (string $path, int $mode)
  • string $path: Absolute path to file
  • int $mode: Permissions, e.g. 0755
static method download (line 31)

Downloads from a URL and saves the result as a local file

  • return: True on success
  • since: 2.5.4
  • access: public
static bool download (string $url, string $target)
  • string $url: The URL to download from
  • string $target: The file path to download to
static method downloadAndReturn (line 128)

Downloads from a URL and returns the result as a string

  • return: Result string on success, false on failure
  • since: 2.5.4
  • access: public
static mixed downloadAndReturn (string $url)
  • string $url: The URL to download from
static method getAdapters (line 373)

Detect and return available download "adapters" (not really adapters, as we don't follow the Adapter pattern, yet)

  • since: 2.5.4
  • access: private
static array getAdapters ()
static method getCURL (line 175)

Downloads the contents of a URL and writes them to disk (if $fp is not null) or returns them as a string (if $fp is null)

  • return: False on failure, true on success ($fp not null) or the URL contents (if $fp is null)
  • since: 2.5.4
  • access: private
static bool|string &getCURL (string $url, [resource $fp = null], [boolean $nofollow = false])
  • string $url: The URL to download from
  • resource $fp: The file pointer to download to. Omit to return the contents.
  • boolean $nofollow: Should we follow 301/302/307 redirection HTTP headers?
static method getFOPEN (line 287)

Download from a URL using URL fopen() wrappers

  • return: False on failure, true on success ($fp not null) or the URL contents (if $fp is null)
  • since: 2.5.4
  • access: private
static bool|string &getFOPEN (string $url, [resource $fp = null])
  • string $url: The URL to download from
  • resource $fp: The file pointer to download to; leave null to return the d/l file as a string
static method hasCURL (line 151)

Does the server support PHP's cURL extension?

  • return: True if it is supported
  • since: 2.5.4
  • access: private
static bool hasCURL ()
static method hasFOPEN (line 255)

Does the server support URL fopen() wrappers?

  • since: 2.5.4
  • access: private
static bool hasFOPEN ()

Documentation generated on Mon, 25 Jun 2012 13:54:19 -0500 by phpDocumentor 1.4.4