Yaya Toure and manager Pep Guardiola learned to put their personalities aside to work together for the good of Manchester City, the midfielder told Cadena Ser radio.

Toure, who will leave City when his contract expires this summer, had a falling out with Guardiola at the beginning of last season after losing his starting place.

The Ivory Coast international apologised for comments made by his agent, who claimed Guardiola had a personal vendetta against his client, and became a crucial player in the second half of last season.

"We sorted it out," said Toure, who was also coached by Guardiola for two seasons at Barcelona. "In these two years, I've had to be professional and I've done the work the coach requested. We are men and we knew what we have to do. He is the boss and I had to listen.

"I've gone through difficult times. The last two years have been challenging for me and I had to learn to work with him. We had to leave our personalities to one side and work together for the good of the club. We are paid for that. It's been a pleasure to work with him the past two years. Would I work again with him? I don't know. I like his style."

The 34-year-old midfielder has made 17 appearances for City this season but his only Premier League start was in the 3-1 win over Brighton on Wednesday. It was his final home appearance after eight years at the Etihad Stadium and he was honoured by his teammates and fans.

"To leave with my head held high and having contributed to the history [of the club] is important," Toure said.

Manchester City midfielder Yaya Toure was honoured in his final appearance at the Etihad Stadium on Wednesday. OLI SCARFF/AFP/Getty Images

Several clubs have been linked with a move for Toure, who will leave having won the Premier League title three times, and Guardiola recently said Toure can still play another season in the top flight.

"I'm 34 and I have one or two more years left in me," Toure said. "We will see what happens next season. I hope I can enjoy myself. I only know football. I'm not a good politician and I'm not good at being in an office."

And, asked if he would return to Barcelona, where he played for three seasons before being sold to City in summer 2010, Toure said he would.

"I would immediately jump at the chance to go back," Toure said. "Barca has been the most important club in my life. It has been crucial in my career. It gave me joy, experience, security. They taught me how to behave on and off the pitch. I took that mentality with me to City."