Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 9ae9743

Browse files
authored
Merge pull request #26 from VectorNetworkProject/develop
Develop
2 parents d73dcad + a2babec commit 9ae9743

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

src/VectorNetworkProject/DataProvider/Tables/Accounts/Accounts.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function init(): void
3131
* @param callable|null $onError
3232
*/
3333
public function register(IPlayer $player, ?callable $onInserted = null, ?callable $onError = null) {
34-
$this->connector->executeInsert(self::ACCOUNT_REGISTER, [$player->getName()], $onInserted, $onError);
34+
$this->connector->executeInsert(self::ACCOUNT_REGISTER, ['name' => $player->getName()], $onInserted, $onError);
3535
}
3636

3737
/**
@@ -42,7 +42,7 @@ public function register(IPlayer $player, ?callable $onInserted = null, ?callabl
4242
* @param callable|null $onError
4343
*/
4444
public function unregister(IPlayer $player, ?callable $onSuccess = null, ?callable $onError = null) {
45-
$this->connector->executeChange(self::ACCOUNT_UNREGISTER, [$player->getName()], $onSuccess, $onError);
45+
$this->connector->executeChange(self::ACCOUNT_UNREGISTER, ['name' => $player->getName()], $onSuccess, $onError);
4646
}
4747

4848
/**
@@ -53,6 +53,6 @@ public function unregister(IPlayer $player, ?callable $onSuccess = null, ?callab
5353
* @param callable|null $onError
5454
*/
5555
public function get(IPlayer $player, ?callable $onSelect = null, ?callable $onError = null) {
56-
$this->connector->executeSelect(self::ACCOUNT_GET, [$player->getName()], $onSelect, $onError);
56+
$this->connector->executeSelect(self::ACCOUNT_GET, ['name' => $player->getName()], $onSelect, $onError);
5757
}
5858
}

src/VectorNetworkProject/DataProvider/Tables/CorePvP/CorePvP.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function init(): void
3434
*/
3535
public function register(IPlayer $player, ?callable $onSuccess = null, ?callable $onError = null): void
3636
{
37-
$this->connector->executeInsert(self::REGISTER, [$player->getname()], $onSuccess, $onError);
37+
$this->connector->executeInsert(self::REGISTER, ['name' => $player->getname()], $onSuccess, $onError);
3838
}
3939

4040
/**
@@ -44,7 +44,7 @@ public function register(IPlayer $player, ?callable $onSuccess = null, ?callable
4444
*/
4545
public function unregister(IPlayer $player, ?callable $onSuccess = null, ?callable $onError = null): void
4646
{
47-
$this->connector->executeInsert(self::UNREGISTER, [$player->getname()], $onSuccess, $onError);
47+
$this->connector->executeInsert(self::UNREGISTER, ['name' => $player->getname()], $onSuccess, $onError);
4848
}
4949

5050
/**
@@ -54,7 +54,7 @@ public function unregister(IPlayer $player, ?callable $onSuccess = null, ?callab
5454
*/
5555
public function get(IPlayer $player, callable $onSuccess, ?callable $onError = null)
5656
{
57-
$this->connector->executeSelect(self::GET, [$player->getName()], $onSuccess, $onError);;
57+
$this->connector->executeSelect(self::GET, ['name' => $player->getName()], $onSuccess, $onError);;
5858
}
5959

6060
/**
@@ -78,7 +78,7 @@ public function add(
7878
?callable $onError = null
7979
): void
8080
{
81-
$this->connector->executeSelect(self::GET, [$player->getname(), $kill, $death, $win, $lose, $exp], $onSuccess, $onError);
81+
$this->connector->executeSelect(self::GET, ['name' => $player->getname(), 'kill' => $kill, 'death' => $death, 'win' => $win, 'lose' => $lose, 'exp' => $exp], $onSuccess, $onError);
8282
}
8383

8484
/**
@@ -88,7 +88,7 @@ public function add(
8888
*/
8989
public function getRankingByKill(int $limit, callable $onSuccess, ?callable $onError = null): void
9090
{
91-
$this->connector->executeSelect( self::GET_RANKING_BY_KILL, [$limit], $onSuccess, $onError);
91+
$this->connector->executeSelect( self::GET_RANKING_BY_KILL, ['limit' => $limit], $onSuccess, $onError);
9292
}
9393

9494
/**
@@ -98,7 +98,7 @@ public function getRankingByKill(int $limit, callable $onSuccess, ?callable $onE
9898
*/
9999
public function getRankingByWin(int $limit, callable $onSuccess, ?callable $onError = null): void
100100
{
101-
$this->connector->executeSelect( self::GET_RANKING_BY_WIN, [$limit], $onSuccess, $onError);
101+
$this->connector->executeSelect( self::GET_RANKING_BY_WIN, ['limit' => $limit], $onSuccess, $onError);
102102
}
103103

104104
/**
@@ -108,6 +108,6 @@ public function getRankingByWin(int $limit, callable $onSuccess, ?callable $onEr
108108
*/
109109
public function getRankingByExp(int $limit, callable $onSuccess, ?callable $onError = null): void
110110
{
111-
$this->connector->executeSelect( self::GET_RANKING_BY_EXP, [$limit], $onSuccess, $onError);
111+
$this->connector->executeSelect( self::GET_RANKING_BY_EXP, ['limit' => $limit], $onSuccess, $onError);
112112
}
113113
}

src/VectorNetworkProject/DataProvider/Tables/Dual/Dual.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function init(): void
3434
*/
3535
public function register(IPlayer $player, ?callable $onInserted = null, ?callable $onError = null): void
3636
{
37-
$this->connector->executeInsert(self::REGISTER, [$player->getName()], $onInserted, $onError);
37+
$this->connector->executeInsert(self::REGISTER, ['name' => $player->getName()], $onInserted, $onError);
3838
}
3939

4040
/**
@@ -46,7 +46,7 @@ public function register(IPlayer $player, ?callable $onInserted = null, ?callabl
4646
*/
4747
public function unregister(IPlayer $player, ?callable $onSelect = null, ?callable $onError = null): void
4848
{
49-
$this->connector->executeChange(self::REGISTER, [$player->getName()], $onSelect, $onError);
49+
$this->connector->executeChange(self::REGISTER, ['name' => $player->getName()], $onSelect, $onError);
5050
}
5151

5252
/**
@@ -58,7 +58,7 @@ public function unregister(IPlayer $player, ?callable $onSelect = null, ?callabl
5858
*/
5959
public function get(IPlayer $player, callable $onSelect, ?callable $onError = null): void
6060
{
61-
$this->connector->executeSelect(self::GET, [$player->getName()], $onSelect, $onError);
61+
$this->connector->executeSelect(self::GET, ['name' => $player->getName()], $onSelect, $onError);
6262
}
6363

6464
/**
@@ -74,7 +74,7 @@ public function get(IPlayer $player, callable $onSelect, ?callable $onError = nu
7474
*/
7575
public function add(IPlayer $player, int $kill = 0, int $death = 0, int $win = 0, int $lose = 0, ?callable $onSelect = null, ?callable $onError = null): void
7676
{
77-
$this->connector->executeChange(self::ADD_COUNT, [$player->getName(), $kill, $death, $win, $lose], $onSelect, $onError);
77+
$this->connector->executeChange(self::ADD_COUNT, ['name' => $player->getName(), 'kill' => $kill, 'death' => $death, 'win' => $win, 'lose' => $lose], $onSelect, $onError);
7878
}
7979

8080
/**
@@ -130,6 +130,6 @@ public function addLose(IPlayer $player, int $lose): void
130130
*/
131131
public function getRankingByWin(int $limit, callable $onSelect, ?callable $onError = null): void
132132
{
133-
$this->connector->executeSelect(self::GET_RANKING, [$limit], $onSelect, $onError);
133+
$this->connector->executeSelect(self::GET_RANKING, ['limit' => $limit], $onSelect, $onError);
134134
}
135135
}

src/VectorNetworkProject/DataProvider/Tables/FFAPvP/FFAPvP.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function init(): void
3535
*/
3636
public function register(IPLayer $player, ?callable $onInserted = null, ?callable $onError = null): void
3737
{
38-
$this->connector->executeInsert(self::REGISTER, [$player->getname()], $onInserted, $onError);
38+
$this->connector->executeInsert(self::REGISTER, ['name' => $player->getname()], $onInserted, $onError);
3939

4040
}
4141

@@ -48,7 +48,7 @@ public function register(IPLayer $player, ?callable $onInserted = null, ?callabl
4848
*/
4949
public function unregister(IPLayer $player, ?callable $onSuccess = null, ?callable $onError = null): void
5050
{
51-
$this->connector->executeChange(self::UNREGISTER, [$player->getName()], $onSuccess, $onError);
51+
$this->connector->executeChange(self::UNREGISTER, ['name' => $player->getName()], $onSuccess, $onError);
5252
}
5353

5454
/**
@@ -60,7 +60,7 @@ public function unregister(IPLayer $player, ?callable $onSuccess = null, ?callab
6060
*/
6161
public function get(IPlayer $player, callable $onSuccess = null, ?callable $onError = null): void
6262
{
63-
$this->connector->executeSelect(self::GET, [$player->getName()], $onSuccess, $onError);
63+
$this->connector->executeSelect(self::GET, ['name' => $player->getName()], $onSuccess, $onError);
6464
}
6565

6666
/**
@@ -72,7 +72,7 @@ public function get(IPlayer $player, callable $onSuccess = null, ?callable $onEr
7272
* @param int $exp
7373
*/
7474
public function add(IPlayer $player, int $kill = 0, int $death = 0, int $exp = 0) {
75-
$this->connector->executeChange(self::ADD_COUNT, [$player->getName(), $kill, $death, $exp]);
75+
$this->connector->executeChange(self::ADD_COUNT, ['name' => $player->getName(), 'kill' => $kill, 'death' => $death, 'exp' => $exp]);
7676
}
7777

7878
/**
@@ -115,7 +115,7 @@ public function addExp(IPlayer $player, int $exp)
115115
*/
116116
public function getRankingByKill(int $limit, ?callable $onSelect = null, ?callable $onError = null): void
117117
{
118-
$this->connector->executeSelect(self::GET_RANKING_BY_KILL, [$limit], $onSelect, $onError);
118+
$this->connector->executeSelect(self::GET_RANKING_BY_KILL, ['limit' => $limit], $onSelect, $onError);
119119
}
120120

121121
/**
@@ -127,6 +127,6 @@ public function getRankingByKill(int $limit, ?callable $onSelect = null, ?callab
127127
*/
128128
public function getRankingByExp(int $limit, ?callable $onSelect = null, ?callable $onError = null): void
129129
{
130-
$this->connector->executeSelect(self::GET_RANKING_BY_EXP, [$limit], $onSelect, $onError);
130+
$this->connector->executeSelect(self::GET_RANKING_BY_EXP, ['limit' => $limit], $onSelect, $onError);
131131
}
132132
}

src/VectorNetworkProject/DataProvider/Tables/NetworkLevel/NetworkLevel.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
class NetworkLevel extends TableBase
1515
{
16-
public const INiT = 'databaseprovider.networklevel.init';
17-
public const REGISTER = 'databaseprovider.networklevel.register';
18-
public const UNREGISTER = 'databaseprovider.networklevel.unregister';
19-
public const GET = 'databaseprovider.networklevel.get';
20-
public const ADD = 'databaseprovider.networklevel.add';
16+
public const INiT = 'userdataprovider.networklevel.init';
17+
public const REGISTER = 'userdataprovider.networklevel.register';
18+
public const UNREGISTER = 'userdataprovider.networklevel.unregister';
19+
public const GET = 'userdataprovider.networklevel.get';
20+
public const ADD = 'userdataprovider.networklevel.add';
2121

2222
public function init(): void
2323
{
@@ -33,7 +33,7 @@ public function init(): void
3333
*/
3434
public function register(IPLayer $player, ?callable $onInserted = null, ?callable $onError = null): void
3535
{
36-
$this->connector->executeInsert(self::REGISTER, [$player->getname()], $onInserted, $onError);
36+
$this->connector->executeInsert(self::REGISTER, ['name' => $player->getName()], $onInserted, $onError);
3737

3838
}
3939

@@ -46,7 +46,7 @@ public function register(IPLayer $player, ?callable $onInserted = null, ?callabl
4646
*/
4747
public function unregister(IPLayer $player, ?callable $onSuccess = null, ?callable $onError = null): void
4848
{
49-
$this->connector->executeChange(self::UNREGISTER, [$player->getName()], $onSuccess, $onError);
49+
$this->connector->executeChange(self::UNREGISTER, ['name' => $player->getName()], $onSuccess, $onError);
5050
}
5151

5252
/**
@@ -58,7 +58,7 @@ public function unregister(IPLayer $player, ?callable $onSuccess = null, ?callab
5858
*/
5959
public function get(IPlayer $player, callable $onSuccess = null, ?callable $onError = null): void
6060
{
61-
$this->connector->executeSelect(self::GET, [$player->getName()], $onSuccess, $onError);
61+
$this->connector->executeSelect(self::GET, ['name' => $player->getName()], $onSuccess, $onError);
6262
}
6363

6464
/**
@@ -71,6 +71,6 @@ public function get(IPlayer $player, callable $onSuccess = null, ?callable $onEr
7171
*/
7272
public function add(IPlayer $player, int $exp = 0, ?callable $onSuccess = null, ?callable $onError = null): void
7373
{
74-
$this->connector->executeChange(self::ADD, [$player->getName(), $exp], $onSuccess, $onError);
74+
$this->connector->executeChange(self::ADD, ['name' => $player->getName(), 'exp' => $exp], $onSuccess, $onError);
7575
}
7676
}

0 commit comments

Comments
 (0)