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
|
@@ 387-396 (lines=10) @@
|
384 |
|
* @callback $cb ( ) |
385 |
|
* @return boolean Success |
386 |
|
*/ |
387 |
|
public function command($cmd, $q = '', $cb = null) |
388 |
|
{ |
389 |
|
if ($this->state !== self::STATE_AUTH_OK) { |
390 |
|
return false; |
391 |
|
} |
392 |
|
|
393 |
|
$this->onResponse->push($cb); |
394 |
|
$this->sendPacket($cmd, $q); |
395 |
|
|
396 |
|
return true; |
397 |
|
} |
398 |
|
|
399 |
|
/** |