Contao\Database\Statement::__get PHP Méthode

__get() public méthode

Return an object property
public __get ( string $strKey ) : mixed | null
$strKey string The property name
Résultat mixed | null The property value or null
    public function __get($strKey)
    {
        switch ($strKey) {
            case 'query':
                return $this->strQuery;
                break;
            case 'error':
                $info = $this->statement->errorInfo();
                return 'SQLSTATE ' . $info[0] . ': error ' . $info[1] . ': ' . $info[2];
                break;
            case 'affectedRows':
                return $this->statement->rowCount();
                break;
            case 'insertId':
                return $this->resConnection->lastInsertId();
                break;
        }
        return null;
    }