Skip to content

Commit bfa8ce5

Browse files
committed
Make LDUserBuilder visible to the outside world
1 parent 63449a1 commit bfa8ce5

File tree

2 files changed

+69
-68
lines changed

2 files changed

+69
-68
lines changed

src/LaunchDarkly/LDUser.php

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,6 @@
11
<?php
22
namespace LaunchDarkly;
33

4-
5-
class LDUserBuilder {
6-
protected $_key = null;
7-
protected $_secondary = null;
8-
protected $_ip = null;
9-
protected $_country = null;
10-
protected $_email = null;
11-
protected $_name = null;
12-
protected $_avatar = null;
13-
protected $_firstName = null;
14-
protected $_lastName = null;
15-
protected $_custom = [];
16-
17-
public function __construct($key) {
18-
$this->_key = $key;
19-
}
20-
21-
public function secondary($secondary) {
22-
$this->_secondary = $secondary;
23-
return $this;
24-
}
25-
26-
public function ip($ip) {
27-
$this->_ip = $ip;
28-
return $this;
29-
}
30-
31-
public function country($country) {
32-
$this->_country = $country;
33-
return $this;
34-
}
35-
36-
public function email($email) {
37-
$this->_email = $email;
38-
return $this;
39-
}
40-
41-
public function name($name) {
42-
$this->_name = $name;
43-
return $this;
44-
}
45-
46-
public function avatar($avatar) {
47-
$this->_avatar = $avatar;
48-
return $this;
49-
}
50-
51-
public function firstName($firstName) {
52-
$this->_firstName = $firstName;
53-
return $this;
54-
}
55-
56-
public function lastName($lastName) {
57-
$this->_lastName = $lastName;
58-
return $this;
59-
}
60-
61-
public function custom($custom) {
62-
$this->_custom = $custom;
63-
return $this;
64-
}
65-
66-
public function build() {
67-
return new LDUser($this->_key, $this->_secondary, $this->_ip, $this->_country, $this->_email, $this->_name, $this->_avatar, $this->_firstName, $this->_lastName, $this->_custom);
68-
}
69-
70-
}
71-
724
/**
735
* Contains specific attributes of a user browsing your site. The only mandatory property property is the key,
746
* which must uniquely identify each user. For authenticated users, this may be a username or e-mail address. For anonymous users,

src/LaunchDarkly/LDUserBuilder.php

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?php
2+
namespace LaunchDarkly;
3+
4+
class LDUserBuilder {
5+
protected $_key = null;
6+
protected $_secondary = null;
7+
protected $_ip = null;
8+
protected $_country = null;
9+
protected $_email = null;
10+
protected $_name = null;
11+
protected $_avatar = null;
12+
protected $_firstName = null;
13+
protected $_lastName = null;
14+
protected $_custom = [];
15+
16+
public function __construct($key) {
17+
$this->_key = $key;
18+
}
19+
20+
public function secondary($secondary) {
21+
$this->_secondary = $secondary;
22+
return $this;
23+
}
24+
25+
public function ip($ip) {
26+
$this->_ip = $ip;
27+
return $this;
28+
}
29+
30+
public function country($country) {
31+
$this->_country = $country;
32+
return $this;
33+
}
34+
35+
public function email($email) {
36+
$this->_email = $email;
37+
return $this;
38+
}
39+
40+
public function name($name) {
41+
$this->_name = $name;
42+
return $this;
43+
}
44+
45+
public function avatar($avatar) {
46+
$this->_avatar = $avatar;
47+
return $this;
48+
}
49+
50+
public function firstName($firstName) {
51+
$this->_firstName = $firstName;
52+
return $this;
53+
}
54+
55+
public function lastName($lastName) {
56+
$this->_lastName = $lastName;
57+
return $this;
58+
}
59+
60+
public function custom($custom) {
61+
$this->_custom = $custom;
62+
return $this;
63+
}
64+
65+
public function build() {
66+
return new LDUser($this->_key, $this->_secondary, $this->_ip, $this->_country, $this->_email, $this->_name, $this->_avatar, $this->_firstName, $this->_lastName, $this->_custom);
67+
}
68+
69+
}

0 commit comments

Comments
 (0)