Private/Polyfony/HttpRequest.php
public function file($key, $path=null) :self {
		// if we have an array of data
		if(is_array($key)) {
			// for each of those
			foreach($key as $index => $path) {
				// set them
				$this->file($index, $path);
			}
		}
		else {
			// add to the list of files
			$this->data[$key] = '@'.$path;
		}
		// return self
		return $this;
	}
public function file($key, $path=null) :self {
		// if we have an array of data
		if(is_array($key)) {
			// for each of those
			foreach($key as $index => $path) {
				// set them
				$this->file($index, $path);
			}
		}
		else {
			// add to the list of files
			$this->data[$key] = '@'.$path;
		}
		// return self
		return $this;
	}
public function file ( $ key , $ path = null ) : self { // if we have an array of data if ( is_array ( $ key ) ) { // for each of those foreach ( $ key as $ index => $ path ) { // set them $ this -> file ( $ index , $ path ) ; } } else { // add to the list of files $ this -> data [ $ key ] = '@' . $ path ; } // return self return $ this ; }
set a file to be posted
set a file to be posted