lastError() 공개 메소드

Check if there was an error on the most recent db operation performed
public lastError ( ) : array
리턴 array Returns the error, if there was one.
예제 #1
0
 public function testForceError() {
     $this->object->forceError();
     $err = $this->object->lastError();
     $this->assertNotNull($err['err']);
     $this->assertEquals($err['n'], 0);
     $this->assertEquals((bool)$err['ok'], true);
 }
예제 #2
0
 /**
  * Wrapper method for MongoDB::lastError().
  *
  * @see http://php.net/manual/en/mongodb.lasterror.php
  * @return array
  */
 public function lastError()
 {
     return $this->mongoDB->lastError();
 }
예제 #3
0
 public function lastError()
 {
     return $this->_connected ? $this->_db->lastError() : NULL;
 }