/** * Return a record object for this table * If $data is specified, the record will be filled with the * data present in the associative array * * * If $throwException is true, if any non existing column is found * an error will be thrown * * @throws Exception\ColumnNotFoundException if $ignore_invalid_columns is false and some columns does not exists in table * * @param array|ArrayObject $data associative array containing initial data * @param boolean $ignore_invalid_columns if true will throw an exception if a column does not exists * @return Record */ public function record($data = array(), $ignore_invalid_columns = true) { if (!$ignore_invalid_columns) { $this->checkDataColumns((array) $data); } $record = new Record((array) $data, $this); $record->setState(Record::STATE_NEW); return $record; }