Donald Trump's attacks against "sleazy" reporters and the "dishonest media" belie the fact that he loves the media.

Yes, loves.

Trump craves media attention and courts it doggedly. He consumes coverage of himself voraciously. The media is his lifeline.

"He's an attention junkie. He really is," CNN media analyst Bill Carter said on "New Day." "He likes being the center of attention... He does need the media."

Related: Ex-employees call out Trump University

Trump's desk is littered with web stories about him and magazines with his face on the cover. His televisions are usually tuned to Fox News or CNN. And he is in regular contact with media moguls like Rupert Murdoch.

This behind-the-scenes engagement is in stark contrast to the vitriol he directs at media outlets practically every day.

On Tuesday, he harshly challenged reporters who questioned him about donations to veterans groups. He obviously watched and read the reactions: Eight hours later, he tweeted, "I am getting great credit for my press conference today."

Trump resumed his critique on Wednesday morning: "I raised/gave $5,600,000 for the veterans and the media makes me look bad! They do anything to belittle -- totally biased."

Trump acts as his own publicist and, like a TV producer, is preoccupied by his ability to draw big ratings.

On Tuesday night, he tweeted congratulations to Fox's Sean Hannity for "his tremendous increase in television ratings," and added, "Speaking of ratings- I will be on his show tonight @ 10pE."

Related: PGA Tour moves tourney from Trump course to Mexico

Trump is well known for sending hand-written notes (both positive and negative) to writers. He goes out of his way to flatter journalists with tweets and phone calls when he thinks they're deserving. He seems to enjoy socializing with television personalities and claiming tight relationships with executives.

In a lengthy interview with Michael Wolff for The Hollywood Reporter, published on Wednesday, Trump called Murdoch a "tremendous guy;" said CBS CEO Les Moonves is "the greatest"; said he knows Fox News chief Roger Ailes and CNN chief Jeff Zucker "very well"; and said he thinks NBC News chair Andy Lack is doing a "very good job."

Wolff observed that "he's vague on all subjects outside himself, his campaign and the media. Everything else is mere distraction."

Other interviewers have left Trump's office thinking he was more interested about media and personality than about policy.

"In this conversation, 'The Apprentice' was the subject that had him most animated," New York magazine's Gabriel Sherman wrote in April after spending time with Trump for a cover story.

At the same time, Trump's calls for the loosening of libel laws, and his repeated insults against journalists have stirred serious concerns among press freedom groups. He loves the media -- but hates negative coverage of his campaign and his businesses.