public function addField($name, $transformer = null, $pos = null) {
			if ($pos === null)
				$pos = sizeof($this->fields);

			$this->fields[$pos] = $name;

			if (is_callable($transformer))
				$this->transformers[$pos] = $transformer;
			else if ($transformer !== null)
				throw new InvalidArgumentException('The transformer provided for ' . $name . ' is not callable');

			return $this;
		}
public function addField($name, $transformer = null, $pos = null) {
			if ($pos === null)
				$pos = sizeof($this->fields);

			$this->fields[$pos] = $name;

			if (is_callable($transformer))
				$this->transformers[$pos] = $transformer;
			else if ($transformer !== null)
				throw new InvalidArgumentException('The transformer provided for ' . $name . ' is not callable');

			return $this;
		}
public function addField ( $ name , $ transformer = null , $ pos = null ) { if ( $ pos === null ) $ pos = sizeof ( $ this -> fields ) ; $ this -> fields [ $ pos ] = $ name ; if ( is_callable ( $ transformer ) ) $ this -> transformers [ $ pos ] = $ transformer ; else if ( $ transformer !== null ) throw new InvalidArgumentException ( 'The transformer provided for ' . $ name . ' is not callable' ) ; return $ this ; }
Adds a named field to a CSV row.

@param string   $name        the name of the field
@param callable $transformer optional; a callback that can be used to transform the field value
@param int      $pos         optional; the column number of the field, if not specified it will append the
colum name to the list
@return CsvFileReader  		an object reference for method chaining
Adds a named field to a CSV row .