diff --git a/src/Storage/StorageUtils.php b/src/Storage/StorageUtils.php index 22fe1607..6f08d811 100644 --- a/src/Storage/StorageUtils.php +++ b/src/Storage/StorageUtils.php @@ -161,11 +161,11 @@ public static function ksortRecursive(&$array, $sortFlags = SORT_REGULAR) { /** * Returns an array that matches the structure of a regular upload for a local file * - * @param $file - * @param string File with path + * @param $file The file you want to get an upload array for. + * @param string Name of the file to use in the upload array. * @return array Array that matches the structure of a regular upload */ - public static function uploadArray($file, $filename = null) { + public static function fileToUploadArray($file, $filename = null) { $File = new File($file); if (empty($fileName)) { $filename = basename($file); @@ -179,6 +179,17 @@ public static function uploadArray($file, $filename = null) { ]; } + /** + * Convenience alias for fileToUploadArray + * + * @param $file + * @param string File with path + * @return array Array that matches the structure of a regular upload + */ + public static function uploadArray($file, $filename = null) { + return self::fileToUploadArray($file, $filename); + } + /** * Gets the hash of a file. *