@@ -44,10 +44,10 @@ This example runs a simple `SELECT` query and dumps all the records from a `book
4444
4545require __DIR__ . '/vendor/autoload.php';
4646
47- $mysql = new React\MySQL \MysqlClient('user:pass@localhost/bookstore');
47+ $mysql = new React\Mysql \MysqlClient('user:pass@localhost/bookstore');
4848
4949$mysql->query('SELECT * FROM book')->then(
50- function (React\MySQL \MysqlResult $command) {
50+ function (React\Mysql \MysqlResult $command) {
5151 print_r($command->resultFields);
5252 print_r($command->resultRows);
5353 echo count($command->resultRows) . ' row(s) in set' . PHP_EOL;
@@ -68,7 +68,7 @@ The `MysqlClient` is responsible for exchanging messages with your MySQL server
6868and keeps track of pending queries.
6969
7070``` php
71- $mysql = new React\MySQL \MysqlClient($uri);
71+ $mysql = new React\Mysql \MysqlClient($uri);
7272
7373$mysql->query(…);
7474```
@@ -114,7 +114,7 @@ The `$uri` parameter must contain the database host, optional
114114authentication, port and database to connect to:
115115
116116``` php
117- $mysql = new React\MySQL \MysqlClient('user:secret@localhost:3306/database');
117+ $mysql = new React\Mysql \MysqlClient('user:secret@localhost:3306/database');
118118```
119119
120120Note that both the username and password must be URL-encoded (percent-encoded)
@@ -124,15 +124,15 @@ if they contain special characters:
124124$user = 'he:llo';
125125$pass = 'p@ss';
126126
127- $mysql = new React\MySQL \MysqlClient(
127+ $mysql = new React\Mysql \MysqlClient(
128128 rawurlencode($user) . ':' . rawurlencode($pass) . '@localhost:3306/db'
129129);
130130```
131131
132132You can omit the port if you're connecting to default port ` 3306 ` :
133133
134134``` php
135- $mysql = new React\MySQL \MysqlClient('user:secret@localhost/database');
135+ $mysql = new React\Mysql \MysqlClient('user:secret@localhost/database');
136136```
137137
138138If you do not include authentication and/or database, then this method
@@ -141,7 +141,7 @@ and no database selected. This may be useful when initially setting up a
141141database, but likely to yield an authentication error in a production system:
142142
143143``` php
144- $mysql = new React\MySQL \MysqlClient('localhost');
144+ $mysql = new React\Mysql \MysqlClient('localhost');
145145```
146146
147147This method respects PHP's ` default_socket_timeout ` setting (default 60s)
@@ -150,7 +150,7 @@ successful authentication. You can explicitly pass a custom timeout value
150150in seconds (or use a negative number to not apply a timeout) like this:
151151
152152``` php
153- $mysql = new React\MySQL \MysqlClient('localhost?timeout=0.5');
153+ $mysql = new React\Mysql \MysqlClient('localhost?timeout=0.5');
154154```
155155
156156By default, idle connections will be held open for 1ms (0.001s) when not
@@ -163,7 +163,7 @@ pass a custom idle timeout value in seconds (or use a negative number to
163163not apply a timeout) like this:
164164
165165``` php
166- $mysql = new React\MySQL \MysqlClient('localhost?idle=10.0');
166+ $mysql = new React\Mysql \MysqlClient('localhost?idle=10.0');
167167```
168168
169169By default, the connection provides full UTF-8 support (using the
@@ -172,7 +172,7 @@ applications nowadays, but for legacy reasons you can change this to use
172172a different ASCII-compatible charset encoding like this:
173173
174174``` php
175- $mysql = new React\MySQL \MysqlClient('localhost?charset=utf8mb4');
175+ $mysql = new React\Mysql \MysqlClient('localhost?charset=utf8mb4');
176176```
177177
178178If you need custom connector settings (DNS resolution, TLS parameters, timeouts,
@@ -191,7 +191,7 @@ $connector = new React\Socket\Connector([
191191 )
192192]);
193193
194- $mysql = new React\MySQL \MysqlClient('user:secret@localhost:3306/database', $connector);
194+ $mysql = new React\Mysql \MysqlClient('user:secret@localhost:3306/database', $connector);
195195```
196196
197197This class takes an optional ` LoopInterface|null $loop ` parameter that can be used to
@@ -225,7 +225,7 @@ unknown or known to be too large to fit into memory, you should use the
225225[ ` queryStream() ` ] ( #querystream ) method instead.
226226
227227``` php
228- $mysql->query($query)->then(function (React\MySQL \MysqlResult $command) {
228+ $mysql->query($query)->then(function (React\Mysql \MysqlResult $command) {
229229 if (isset($command->resultRows)) {
230230 // this is a response to a SELECT etc. with some rows (0+)
231231 print_r($command->resultFields);
0 commit comments