PHPDaemon/Clients/MySQL/Connection.php 1 location
|
@@ 417-427 (lines=11) @@
|
| 414 |
|
* @callback $cb ( Connection $conn, boolean $success ) |
| 415 |
|
* @return boolean Success |
| 416 |
|
*/ |
| 417 |
|
public function command($cmd, $q = '', $cb = null) |
| 418 |
|
{ |
| 419 |
|
if ($this->phase !== self::PHASE_HANDSHAKED) { |
| 420 |
|
return false; |
| 421 |
|
} |
| 422 |
|
|
| 423 |
|
$this->onResponse->push($cb); |
| 424 |
|
$this->seq = 0; |
| 425 |
|
$this->sendPacket(chr($cmd) . $q); |
| 426 |
|
|
| 427 |
|
return true; |
| 428 |
|
} |
| 429 |
|
|
| 430 |
|
/** |
PHPDaemon/Clients/PostgreSQL/Connection.php 1 location
|
@@ 368-377 (lines=10) @@
|
| 365 |
|
* @callback $cb ( ) |
| 366 |
|
* @return boolean Success |
| 367 |
|
*/ |
| 368 |
|
public function command($cmd, $q = '', $cb = null) |
| 369 |
|
{ |
| 370 |
|
if ($this->state !== self::STATE_AUTH_OK) { |
| 371 |
|
return false; |
| 372 |
|
} |
| 373 |
|
|
| 374 |
|
$this->onResponse->push($cb); |
| 375 |
|
$this->sendPacket($cmd, $q); |
| 376 |
|
|
| 377 |
|
return true; |
| 378 |
|
} |
| 379 |
|
|
| 380 |
|
/** |