Ejemplo n.º 1
0
	/**
	 * Writes the answer to the database, either updating it
	 * when it already exists, or inserting it when it doesn't.
	 *
	 * @since 1.20
	 * @deprecated since 1.22 Use IORMTable->updateRow or ->insertRow
	 *
	 * @param string|null $functionName
	 *
	 * @return boolean Success indicator
	 */
	public function save( $functionName = null ) {
		if ( $this->hasIdField() ) {
			return $this->table->updateRow( $this, $functionName );
		} else {
			return $this->table->insertRow( $this, $functionName );
		}
	}