3 namespace Domain\Entities
;
5 use Domain\VOs\ICountry
;
7 use Domain\Entities\IUserFactory
;
8 use Domain\Entities\IUserBuilder
;
10 class UserBuilder
implements IUserBuilder
12 private $_userFactory;
14 private $_displayName;
18 private $_yearsStepArtist;
21 public function __construct(IUserFactory
$userFactory)
23 $this->_userFactory
= $userFactory;
26 public function With_Country(ICountry
$country = null
) {
27 $this->_country
= $country;
31 public function With_DisplayName($name) {
32 $this->_displayName
= $name;
36 public function With_Name(IName
$name) {
41 public function With_Tags(array $tags) {
46 public function With_FacebookId($id) {
47 $this->_facebookId
= $id;
51 public function With_YearsStepArtist($years) {
52 $this->_yearsStepArtist
= $years;
56 public function With_Quota($quota)
58 $this->_quota
= $quota;
61 public function build() {
62 return $this->_userFactory
63 ->createInstance($this->_country
,