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