public function gapi::__construct in Google Analytics Statistics 7.x
Same name and namespace in other branches
- 7.2 includes/gapi.class.php \gapi::__construct()
- 7 includes/gapi.class.php \gapi::__construct()
Constructor function for all new gapi instances
Set up authenticate with Google and get auth_token
Parameters
String $email:
String $password:
String $token:
Return value
gapi
File
- inc/
gapi.class.php, line 54
Class
- gapi
- GAPI - Google Analytics PHP Interface
Code
public function __construct($email, $password, $token = null) {
if ($token !== null) {
$this->auth_token = $token;
}
else {
$this
->authenticateUser($email, $password);
}
}