You are here

public function HeartbeatActivity::__get in Heartbeat 6.3

Same name and namespace in other branches
  1. 6.4 includes/heartbeatactivity.inc \HeartbeatActivity::__get()

Method gets a heartbeat_activity variable

@desc The magic getter method fetches a variable in members. If not found there, it will always check the variables as well

File

includes/heartbeatactivity.inc, line 81

Class

HeartbeatActivity
Class to handle user activity data

Code

public function __get($variable) {

  // a private member is asked
  $var = null;
  if (property_exists($this, 'm_' . $variable)) {
    $var = $this->{'m_' . $variable};
  }
  else {
    if (property_exists($this, $variable)) {
      $var = $this->{$variable};
    }
    else {
      if (array_key_exists($variable, $this->m_variables_array)) {
        $var = $this->m_variables_array[$variable];
      }
    }
  }
  return $var;
}