Exemplo n.º 1
0
 /**
  * @param UserId $id
  * @param string $name
  * @param int    $age
  */
 public function __construct(UserId $id, $name, $age)
 {
     parent::__construct($id);
     $this->name = $name;
     $this->fullName = StringLiteral::fromNative($name);
     $this->age = $age;
     $this->phonenumbers = new ArrayList();
     $this->roles = new ArraySet();
     $this->languagesLevel = new ArrayHashMap();
     $this->addresses = new ArraySet();
     $this->friends = new ArraySet();
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function equals($other)
 {
     return parent::equals($other) && $this->title() == $other->title() && $this->content() == $other->content() && $this->published() == $other->published();
 }