src/Readdle/Database/FQDBQueryAPI.php
public function queryObj($query, $className, $options = array(), $classConstructorArguments = NULL)
    {
        if (!class_exists($className)) {
            $this->_error(FQDBException::CLASS_NOT_EXIST, FQDBException::FQDB_CODE);
        }

        $statement = $this->_runQuery($query, $options);
        $statement->setFetchMode(\PDO::FETCH_CLASS | \PDO::FETCH_PROPS_LATE, $className, $classConstructorArguments);

        return $statement->fetch();
    }
public function queryObj($query, $className, $options = array(), $classConstructorArguments = NULL)
    {
        if (!class_exists($className)) {
            $this->_error(FQDBException::CLASS_NOT_EXIST, FQDBException::FQDB_CODE);
        }

        $statement = $this->_runQuery($query, $options);
        $statement->setFetchMode(\PDO::FETCH_CLASS | \PDO::FETCH_PROPS_LATE, $className, $classConstructorArguments);

        return $statement->fetch();
    }
public function queryObj ( $ query , $ className , $ options = array ( ) , $ classConstructorArguments = NULL ) { if ( ! class_exists ( $ className ) ) { $ this -> _error ( FQDBException :: CLASS_NOT_EXIST , FQDBException :: FQDB_CODE ) ; } $ statement = $ this -> _runQuery ( $ query , $ options ) ; $ statement -> setFetchMode ( \ PDO :: FETCH_CLASS | \ PDO :: FETCH_PROPS_LATE , $ className , $ classConstructorArguments ) ; return $ statement -> fetch ( ) ; }
executes SELECT or SHOW query and returns object of given class
@param string $query
@param string $className
@param array $options
@param array $classConstructorArguments
@return object|false
executes SELECT or SHOW query and returns object of given class