class gapiAccountEntry in Google Analytics Statistics 7.2
Same name and namespace in other branches
- 7 includes/gapi.class.php \gapiAccountEntry
- 7.x inc/gapi.class.php \gapiAccountEntry
Storage for individual gapi account entries
Hierarchy
- class \gapiAccountEntry
Expanded class hierarchy of gapiAccountEntry
File
- includes/
gapi.class.php, line 419
View source
class gapiAccountEntry {
private $properties = array();
/**
* Constructor function for all new gapiAccountEntry instances
*
* @param Array $properties
* @return gapiAccountEntry
*/
public function __construct($properties) {
$this->properties = $properties;
}
/**
* toString function to return the name of the account
*
* @return String
*/
public function __toString() {
return isset($this->properties['name']) ? $this->properties['name'] : false;
}
/**
* Get an associative array of the properties
* and the matching values for the current result
*
* @return Array
*/
public function getProperties() {
return $this->properties;
}
/**
* Call method to find a matching parameter to return
*
* @param $name String name of function called
* @return String
* @throws Exception if not a valid parameter, or not a 'get' function
*/
public function __call($name, $parameters) {
if (!preg_match('/^get/', $name)) {
throw new Exception('No such function "' . $name . '"');
}
$name = preg_replace('/^get/', '', $name);
$property_key = gapi::ArrayKeyExists($name, $this->properties);
if ($property_key) {
return $this->properties[$property_key];
}
throw new Exception('No valid property called "' . $name . '"');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
gapiAccountEntry:: |
private | property | ||
gapiAccountEntry:: |
public | function | Get an associative array of the properties and the matching values for the current result | |
gapiAccountEntry:: |
public | function | Call method to find a matching parameter to return | |
gapiAccountEntry:: |
public | function | Constructor function for all new gapiAccountEntry instances | |
gapiAccountEntry:: |
public | function | toString function to return the name of the account |