From ce6c4785390e5eb056f3e61e590241f5c0481500 Mon Sep 17 00:00:00 2001 From: Jennifer Hodgdon Date: Wed, 12 Feb 2014 16:20:29 -0800 Subject: Issue #2174353 by anemes, bryanlburkholder: Fix up docs for system_retrieve_file --- modules/system/system.module | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'modules/system') 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); -- cgit v1.2.3