mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 08:47:32 -05:00 
			
		
		
		
	* Adjustments for tests * Implement handling of temp downloading resources * Refactor paths * Refactors for file paths * Refactor paths * Add in S3 adapter * Refactor company Documment URL * Refactor for entity pdf performance * Refactors for invoice generation * Enhancements for emails invoices * Emails * Fixes for client portal queries
		
			
				
	
	
		
			26 lines
		
	
	
		
			467 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			467 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
/**
 | 
						|
 * Invoice Ninja (https://invoiceninja.com)
 | 
						|
 *
 | 
						|
 * @link https://github.com/invoiceninja/invoiceninja source repository
 | 
						|
 *
 | 
						|
 * @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
 | 
						|
 *
 | 
						|
 * @license https://opensource.org/licenses/AAL
 | 
						|
 */
 | 
						|
 | 
						|
namespace App\Utils;
 | 
						|
 | 
						|
class TempFile
 | 
						|
{
 | 
						|
 | 
						|
	public static function path($url) :string
 | 
						|
	{
 | 
						|
 | 
						|
		$temp_path = tempnam(sys_get_temp_dir(), basename($url));
 | 
						|
		copy($url, $temp_path);
 | 
						|
 | 
						|
		return $temp_path;
 | 
						|
	}
 | 
						|
 | 
						|
} |