readObject() public method

Returns an object populated with the next row of data.
public readObject ( string $className, array $fields ) : mixed
$className string class name of the object to be created and populated
$fields array Elements of this array are passed to the constructor
return mixed the populated object, false if no more row of data available
 /**
  * Returns an object populated with the next row of data.
  * @param string $className class name of the object to be created and populated
  * @param array $fields Elements of this array are passed to the constructor
  * @return mixed the populated object, false if no more row of data available
  */
 public function readObject($className, $fields)
 {
     //Try..Catch to prevent Function sequence error: -11067
     try {
         return parent::readObject($className, $fields);
     } catch (\Exception $ex) {
     }
     return false;
 }
 /**
  * Returns an object populated with the next row of data.
  * @param string $className class name of the object to be created and populated
  * @param array $fields Elements of this array are passed to the constructor
  * @return mixed the populated object, false if no more row of data available
  */
 public function readObject($className, $fields)
 {
     //Try..Catch to prevent CLI0125E  Function sequence error. SQLSTATE=HY010
     try {
         return parent::readObject($className, $fields);
     } catch (\Exception $ex) {
     }
     return false;
 }