src/Axolotl/Model.php
public function get_primary_id() {
		if ( $this instanceof UsesWordPressPost ) {
			return $this->get_underlying_wp_object()->ID;
		}

		if ( $this instanceof UsesWordPressTerm ) {
			return $this->get_underlying_wp_object()->term_id;
		}

		if ( $this instanceof UsesCustomTable ) {
			return $this->get_attribute( $this->get_primary_key() );
		}

		// Model w/o wp_object not yet supported.
		throw new LogicException;
	}
public function get_primary_id() {
		if ( $this instanceof UsesWordPressPost ) {
			return $this->get_underlying_wp_object()->ID;
		}

		if ( $this instanceof UsesWordPressTerm ) {
			return $this->get_underlying_wp_object()->term_id;
		}

		if ( $this instanceof UsesCustomTable ) {
			return $this->get_attribute( $this->get_primary_key() );
		}

		// Model w/o wp_object not yet supported.
		throw new LogicException;
	}
public function get_primary_id ( ) { if ( $ this instanceof UsesWordPressPost ) { return $ this -> get_underlying_wp_object ( ) -> ID ; } if ( $ this instanceof UsesWordPressTerm ) { return $ this -> get_underlying_wp_object ( ) -> term_id ; } if ( $ this instanceof UsesCustomTable ) { return $ this -> get_attribute ( $ this -> get_primary_key ( ) ) ; } // Model w/o wp_object not yet supported. throw new LogicException ; }
Fetches the Model's primary ID, depending on the model
implementation.

@return int

@throws LogicException
Fetches the Model s primary ID depending on the model implementation .