src/main/php/pdo/PdoDatabaseConnection.php
public function getLastInsertId(string $name = null)
    {
        if (null === $this->pdo) {
            throw new DatabaseException('Not connected: can not retrieve last insert id');
        }

        try {
            return $this->pdo->lastInsertId($name);
        } catch (PDOException $pdoe) {
            throw new DatabaseException($pdoe->getMessage(), $pdoe);
        }
    }
public function getLastInsertId(string $name = null)
    {
        if (null === $this->pdo) {
            throw new DatabaseException('Not connected: can not retrieve last insert id');
        }

        try {
            return $this->pdo->lastInsertId($name);
        } catch (PDOException $pdoe) {
            throw new DatabaseException($pdoe->getMessage(), $pdoe);
        }
    }
public function getLastInsertId ( string $ name = null ) { if ( null === $ this -> pdo ) { throw new DatabaseException ( 'Not connected: can not retrieve last insert id' ) ; } try { return $ this -> pdo -> lastInsertId ( $ name ) ; } catch ( PDOException $ pdoe ) { throw new DatabaseException ( $ pdoe -> getMessage ( ) , $ pdoe ) ; } }
returns the last insert id

@param   string  $name  name of the sequence object from which the ID should be returned.
@return  int
@throws  \stubbles\db\DatabaseException
returns the last insert id