public function _createAvatar(RM_User_Profile $profile, $src) { $photo = RM_Photo::create($profile->getUser()); $photo->upload($src); return $photo; }