I am trying to integrate google client api in my codeigniter project and i have put google client api library in my thirdparty folder. And then made a library named Google.php Code is given below:
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
set_include_path(APPPATH . 'third_party/' . PATH_SEPARATOR . get_include_path());
require_once APPPATH . 'third_party/Google/Client.php';
class Google extends Google_Client {
function __construct($params = array()) {
parent::__construct();
}
}
?>
And then i include this library in my main controller and tried to access it,
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class main extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->library('google');
}
public function index() {
echo $this->google->getLibraryVersion();
}
}
but when i tried this Google Client Library shows this error given below.
Google Client.php is showing first error on this line
/** @var array $scopes */
// Scopes requested by the client
protected $requestedScopes = [];