public function __get($name) { if (array_key_exists($name, self::$active_properties)) { return self::$active_properties[$name]; } else { die(pi_error('Failed to load property: \'' . $name . '\', check to see if property exists')); } }
function get_by_id($id, $table = NULL) { $data = $this->get_all($table); if (!isset($id)) { die(pi_error('No row id provided to pull data')); } if (array_key_exists($id, $data)) { return $data[$id]; } else { die(pi_error('Row id is invalid for this table')); } }