src/Model.php
public function to_array() {

		$attributes = array();

		foreach ( static::table()->get_columns() as $attribute => $column ) {
			$attributes[ $attribute ] = $this->get_attribute( $attribute );
		}

		return $attributes;
	}
public function to_array() {

		$attributes = array();

		foreach ( static::table()->get_columns() as $attribute => $column ) {
			$attributes[ $attribute ] = $this->get_attribute( $attribute );
		}

		return $attributes;
	}
Convert the model to an array.

@since 2.0

@return array