troubleshooting Question

Setting up gmail class

Avatar of Alex Lord
Alex Lord asked on
PHP* classesGmail
7 Comments1 Solution123 ViewsLast Modified:
  class GmailService {

            public $service;
            private $client;
            private $gmToken;
            private $refreshToken;

            public function __construct($service)

               //using pdo to get tokans for the foreach below//
                foreach($result as $getTOKEN){
                    $gmToken = $getTOKEN['TOKEN'];
                    $gmReToken = $getTOKEN['TOKEN_REFRESH'];

                $client = $this->getGmClient($gmToken, $gmReToken);
                $service = new Google_Service_Gmail($client);

am i setting up this class correctly ? im setting up a gmail class so when the page loads this script is called and im trying to setup the variables on the contruct, is this correct?

im getting the tokan if it exists and setting up the gmail service.
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros