protected static function get_data_from_pk( $pk ) {

		$data = static::$_cache ? Cache::get( $pk, static::get_cache_group() ) : null;

		if ( ! $data ) {
			$query = new FluentQuery( static::table() );
			$data  = $query->where( static::table()->get_primary_key(), '=', $pk )->first();
		}

		return $data ? (object) $data : null;
	}
protected static function get_data_from_pk( $pk ) {

		$data = static::$_cache ? Cache::get( $pk, static::get_cache_group() ) : null;

		if ( ! $data ) {
			$query = new FluentQuery( static::table() );
			$data  = $query->where( static::table()->get_primary_key(), '=', $pk )->first();
		}

		return $data ? (object) $data : null;
	}
protected static function get_data_from_pk ( $ pk ) { $ data = static :: $ _cache ? Cache :: get ( $ pk , static :: get_cache_group ( ) ) : null ; if ( ! $ data ) { $ query = new FluentQuery ( static :: table ( ) ) ; $ data = $ query -> where ( static :: table ( ) -> get_primary_key ( ) , '=' , $ pk ) -> first ( ) ; } return $ data ? ( object ) $ data : null ; }
Get data for a primary key.

@since 1.0

@param int|string $pk Primary key for this record.

@return \stdClass|null
Get data for a primary key .