Ejemplo n.º 1
0
 public function __construct(array $users = array())
 {
     $this->users = new SplObjectStorage();
     foreach ($users as $user) {
         $this->users->attach(new User(new UserId($user['id']), new Name($user['name']), new EmailAddress($user['email'])));
     }
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     $this->users = new SplObjectStorage();
     $this->users->attach(new User(1034, 'Rafael', '*****@*****.**'));
     $this->users->attach(new User(1035, 'Donatello', '*****@*****.**'));
     $this->users->attach(new User(1036, 'Michelangelo', '*****@*****.**'));
     $this->users->attach(new User(1037, 'Leonardo', '*****@*****.**'));
 }