protected function getFilePath($file)
    {
        // if were passed an instance of UploadedFile, return the path
        if ($file instanceof UploadedFile) {
            return $file->getPathname();
        }

        // if we're passed a PHP file upload array, return the "tmp_name"
        if (is_array($file) && null !== array_get($file, 'tmp_name')) {
            return $file['tmp_name'];
        }

        // fallback: we were likely passed a path already
        return $file;
    }
protected function getFilePath($file)
    {
        // if were passed an instance of UploadedFile, return the path
        if ($file instanceof UploadedFile) {
            return $file->getPathname();
        }

        // if we're passed a PHP file upload array, return the "tmp_name"
        if (is_array($file) && null !== array_get($file, 'tmp_name')) {
            return $file['tmp_name'];
        }

        // fallback: we were likely passed a path already
        return $file;
    }
protected function getFilePath ( $ file ) { // if were passed an instance of UploadedFile, return the path if ( $ file instanceof UploadedFile ) { return $ file -> getPathname ( ) ; } // if we're passed a PHP file upload array, return the "tmp_name" if ( is_array ( $ file ) && null !== array_get ( $ file , 'tmp_name' ) ) { return $ file [ 'tmp_name' ] ; } // fallback: we were likely passed a path already return $ file ; }
Return the file path from the passed object

@param $file mixed
@return string
Return the file path from the passed object