public function setFiles($file, $name = null)
	{
		// Verifying if is array
		if (is_array($file)) {
			foreach ($file as $k => $v) {
				$this->setFiles($v,$k);
			}
		} else {
			$parray = &$this->files;
			
			if (file_exists($file)) {
				if (is_null($file)) {
					if (isset($parray[$name])) unset($parray[$name]);
				} else {
					if (is_null($name) || is_integer($name)) {
						$count = count($parray);
						$name = 'file_contents_' . $count;
					}
						
					$parray[$name] = $file;
				}
			} else {
				throw new RuntimeException('Invalid file, file not exists.');
			}	
		}
		
		return $this;
	}
public function setFiles($file, $name = null)
	{
		// Verifying if is array
		if (is_array($file)) {
			foreach ($file as $k => $v) {
				$this->setFiles($v,$k);
			}
		} else {
			$parray = &$this->files;
			
			if (file_exists($file)) {
				if (is_null($file)) {
					if (isset($parray[$name])) unset($parray[$name]);
				} else {
					if (is_null($name) || is_integer($name)) {
						$count = count($parray);
						$name = 'file_contents_' . $count;
					}
						
					$parray[$name] = $file;
				}
			} else {
				throw new RuntimeException('Invalid file, file not exists.');
			}	
		}
		
		return $this;
	}
public function setFiles ( $ file , $ name = null ) { // Verifying if is array if ( is_array ( $ file ) ) { foreach ( $ file as $ k => $ v ) { $ this -> setFiles ( $ v , $ k ) ; } } else { $ parray = & $ this -> files ; if ( file_exists ( $ file ) ) { if ( is_null ( $ file ) ) { if ( isset ( $ parray [ $ name ] ) ) unset ( $ parray [ $ name ] ) ; } else { if ( is_null ( $ name ) || is_integer ( $ name ) ) { $ count = count ( $ parray ) ; $ name = 'file_contents_' . $ count ; } $ parray [ $ name ] = $ file ; } } else { throw new RuntimeException ( 'Invalid file, file not exists.' ) ; } } return $ this ; }
Set files for send in request

@param string|array $file
@param string $name
@return \Slice\Http\Client
Set files for send in request