summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorJennifer Hodgdon <yahgrp@poplarware.com>2014-02-12 16:20:29 -0800
committerJennifer Hodgdon <yahgrp@poplarware.com>2014-02-12 16:20:29 -0800
commitce6c4785390e5eb056f3e61e590241f5c0481500 (patch)
treeaba64a744cd27ba12df2ad1c387379539654eecc /modules/system
parente49fde1f1dac6f63e79db7d18fe8cb708dfe68d0 (diff)
downloadbrdo-ce6c4785390e5eb056f3e61e590241f5c0481500.tar.gz
brdo-ce6c4785390e5eb056f3e61e590241f5c0481500.tar.bz2
Issue #2174353 by anemes, bryanlburkholder: Fix up docs for system_retrieve_file
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.module20
1 files changed, 11 insertions, 9 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index eada9ffc2..d4f3bc47a 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -3422,30 +3422,32 @@ function system_image_toolkits() {
/**
* Attempts to get a file using drupal_http_request and to store it locally.
*
- * @param $url
+ * @param string $url
* The URL of the file to grab.
- *
- * @param $destination
+ * @param string $destination
* Stream wrapper URI specifying where the file should be placed. If a
* directory path is provided, the file is saved into that directory under
* its original name. If the path contains a filename as well, that one will
* be used instead.
* If this value is omitted, the site's default files scheme will be used,
* usually "public://".
- *
- * @param $managed boolean
+ * @param bool $managed
* If this is set to TRUE, the file API hooks will be invoked and the file is
* registered in the database.
- *
- * @param $replace boolean
+ * @param int $replace
* Replace behavior when the destination file already exists:
* - FILE_EXISTS_REPLACE: Replace the existing file.
* - FILE_EXISTS_RENAME: Append _{incrementing number} until the filename is
* unique.
* - FILE_EXISTS_ERROR: Do nothing and return FALSE.
*
- * @return
- * On success the location the file was saved to, FALSE on failure.
+ * @return mixed
+ * One of these possibilities:
+ * - If it succeeds and $managed is FALSE, the location where the file was
+ * saved.
+ * - If it succeeds and $managed is TRUE, a \Drupal\file\FileInterface
+ * object which describes the file.
+ * - If it fails, FALSE.
*/
function system_retrieve_file($url, $destination = NULL, $managed = FALSE, $replace = FILE_EXISTS_RENAME) {
$parsed_url = parse_url($url);