protected function create() {

		foreach ( $this->data as $col => $val ) {

			if ( method_exists( $this, "validate_$col" ) ) {
				$this->data[ $col ] = $this->{"validate_$col"}( $val );
			}
		}

		return Manager::make_simple_query_object( $this->get_table()->get_slug() )
		              ->insert( $this->data );
	}
protected function create() {

		foreach ( $this->data as $col => $val ) {

			if ( method_exists( $this, "validate_$col" ) ) {
				$this->data[ $col ] = $this->{"validate_$col"}( $val );
			}
		}

		return Manager::make_simple_query_object( $this->get_table()->get_slug() )
		              ->insert( $this->data );
	}
protected function create ( ) { foreach ( $ this -> data as $ col => $ val ) { if ( method_exists ( $ this , "validate_$col" ) ) { $ this -> data [ $ col ] = $ this -> { "validate_$col" } ( $ val ) ; } } return Manager :: make_simple_query_object ( $ this -> get_table ( ) -> get_slug ( ) ) -> insert ( $ this -> data ) ; }
Create the object.

This will call validate functions on columns if they exist. These should
be used to validate data that is dependent on other data.

@since 1.0

@return int|string PK of new record.
@throws Exception
Create the object .