]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Repository/GoogleTokenRepository.php
Version 0.6.0
[airbundle] / Repository / GoogleTokenRepository.php
index 7c96e7284af8454da8455a7e7d3d5284925248d4..4aecf6c857a761a585c823cb2deeef69ab3de8fa 100644 (file)
@@ -34,6 +34,7 @@ SELECT
        b.uid,
        b.access,
        b.refresh,
+       b.created,
        b.expired,
        b.cids,
        b.cmails,
@@ -48,6 +49,7 @@ FROM (
                a.uid,
                a.access,
                a.refresh,
+               a.created,
                a.expired,
                a.cids,
                a.cmails,
@@ -61,6 +63,7 @@ FROM (
                        t.user_id AS uid,
                        t.access,
                        t.refresh,
+                       t.created,
                        t.expired,
                        GROUP_CONCAT(c.id ORDER BY c.id SEPARATOR "\\n") AS cids,
                        GROUP_CONCAT(c.mail ORDER BY c.id SEPARATOR "\\n") AS cmails,
@@ -92,7 +95,8 @@ SQL;
                        ->addScalarResult('uid', 'uid', 'integer')
                        ->addScalarResult('access', 'access', 'string')
                        ->addScalarResult('refresh', 'refresh', 'string')
-                       ->addScalarResult('expired', 'expired', 'datetime')
+                       ->addScalarResult('created', 'created', 'datetime_immutable')
+                       ->addScalarResult('expired', 'expired', 'datetime_immutable')
                        ->addScalarResult('cids', 'cids', 'string')
                        ->addScalarResult('cmails', 'cmails', 'string')
                        ->addScalarResult('csummaries', 'csummaries', 'string')
@@ -105,7 +109,7 @@ SQL;
                $result = [];
 
                //Get tokens
-               $tokens = $this->_em
+               $tokens = $this->manager
                        ->createNativeQuery($req, $rsm)
                        ->getArrayResult();
 
@@ -130,6 +134,7 @@ SQL;
                                'uid' => $token['uid'],
                                'access' => $token['access'],
                                'refresh' => $token['refresh'],
+                               'created' => $token['created'],
                                'expired' => $token['expired'],
                                'calendars' => [],
                                'dances' => [],