- $this->identifier_uri = $identifier_uri;
- $this->param_array = false;
- }
-
- /**
- * Returns the profile as array
- *
- * The method returns an array which contains the whole profile as array. The
- * array is cached and only rebuilt on changes of the profile.
- *
- * @param bool $force_all Specifies whether empty fields should be added to
- * the array as well. This is neccessary to clear
- * fields via updateProfile.
- *
- * @param string $prefix The common prefix to the key for all parameters.
- *
- * @access public
- *
- * @return array The profile as parameter array
- */
- public function asParameters($prefix, $force_all = false) {
- if ($this->param_array === false) {
- $this->param_array = array('' => $this->identifier_uri);
-
- if ($force_all || !is_null($this->profile_url)) {
- $this->param_array['_profile'] = $this->profile_url;
- }
-
- if ($force_all || !is_null($this->homepage)) {
- $this->param_array['_homepage'] = $this->homepage;
- }
-
- if ($force_all || !is_null($this->nickname)) {
- $this->param_array['_nickname'] = $this->nickname;
- }
-
- if ($force_all || !is_null($this->license_url)) {
- $this->param_array['_license'] = $this->license_url;
- }
-
- if ($force_all || !is_null($this->fullname)) {
- $this->param_array['_fullname'] = $this->fullname;
- }
-
- if ($force_all || !is_null($this->bio)) {
- $this->param_array['_bio'] = $this->bio;
- }
-
- if ($force_all || !is_null($this->location)) {
- $this->param_array['_location'] = $this->location;
- }
-
- if ($force_all || !is_null($this->avatar_url)) {
- $this->param_array['_avatar'] = $this->avatar_url;
- }