propel/generated-classes/Base/User.php
/**
     * Hydrates (populates) the object variables with values from the database resultset.
     *
     * An offset (0-based "start column") is specified so that objects can be hydrated
     * with a subset of the columns in the resultset rows.  This is needed, for example,
     * for results of JOIN queries where the resultset row includes columns from two or
     * more tables.
     *
     * @param array   $row       The row returned by DataFetcher->fetch().
     * @param int     $startcol  0-based offset column which indicates which restultset column to start with.
     * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
     * @param string  $indexType The index type of $row. Mostly DataFetcher->getIndexType().
                                  One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
     *                            TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
     *
     * @return int             next starting column
     * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
     */
Hydrates (populates) the object variables with values from the database resultset.
An offset (0-based "start column") is specified so that objects can be hydrated
with a subset of the columns in the resultset rows.  This is needed, for example,
for results of JOIN queries where the resultset row includes columns from two or
more tables.

@param array   $row       The row returned by DataFetcher->fetch().
@param int     $startcol  0-based offset column which indicates which restultset column to start with.
@param boolean $rehydrate Whether this object is being re-hydrated from the database.
@param string  $indexType The index type of $row.

@return int             next starting column
@throws PropelException - Any caught Exception will be rewrapped as a PropelException.
Hydrates ( populates ) the object variables with values from the database resultset . An offset ( 0 - based " start column " ) is specified so that objects can be hydrated with a subset of the columns in the resultset rows . This is needed for example for results of JOIN queries where the resultset row includes columns from two or more tables . @param array $row The row returned by DataFetcher - > fetch () . @param int $startcol 0 - based offset column which indicates which restultset column to start with . @param boolean $rehydrate Whether this object is being re - hydrated from the database . @param string $indexType The index type of $row . @return int next starting column @throws PropelException - Any caught Exception will be rewrapped as a PropelException .
public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
    {
        try {
            $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : UserTableMap::translateFieldName('ID', TableMap::TYPE_PHPNAME, $indexType)];
            $this->id = (null !== $col) ? (int) $col : null;
            $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : UserTableMap::translateFieldName('UUID', TableMap::TYPE_PHPNAME, $indexType)];
            $this->uuid = (null !== $col) ? (string) $col : null;
            $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : UserTableMap::translateFieldName('UserName', TableMap::TYPE_PHPNAME, $indexType)];
            $this->username = (null !== $col) ? (string) $col : null;
            $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : UserTableMap::translateFieldName('EmailAddress', TableMap::TYPE_PHPNAME, $indexType)];
            $this->email = (null !== $col) ? (string) $col : null;
            $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : UserTableMap::translateFieldName('Password', TableMap::TYPE_PHPNAME, $indexType)];
            $this->password = (null !== $col) ? (string) $col : null;
            $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : UserTableMap::translateFieldName('UserRole', TableMap::TYPE_PHPNAME, $indexType)];
            $this->role = (null !== $col) ? (int) $col : null;
            $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : UserTableMap::translateFieldName('IsVisible', TableMap::TYPE_PHPNAME, $indexType)];
            $this->visible = (null !== $col) ? (int) $col : null;
            $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : UserTableMap::translateFieldName('Status', TableMap::TYPE_PHPNAME, $indexType)];
            $this->status = (null !== $col) ? (int) $col : null;
            $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : UserTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
            if ($col === '0000-00-00 00:00:00') {
                $col = null;
            }
            $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
            $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : UserTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
            if ($col === '0000-00-00 00:00:00') {
                $col = null;
            }
            $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
            $this->resetModified();
            $this->setNew(false);
            if ($rehydrate) {
                $this->ensureConsistency();
            }
            return $startcol + 10; 
        } catch (Exception $e) {
            throw new PropelException("Error populating \User object", 0, $e);
        }
    }
public function hydrate ( $ row , $ startcol = 0 , $ rehydrate = false , $ indexType = TableMap :: TYPE_NUM ) { try { $ col = $ row [ TableMap :: TYPE_NUM == $ indexType ? 0 + $ startcol : UserTableMap :: translateFieldName ( 'ID' , TableMap :: TYPE_PHPNAME , $ indexType ) ] ; $ this -> id = ( null !== $ col ) ? ( int ) $ col : null ; $ col = $ row [ TableMap :: TYPE_NUM == $ indexType ? 1 + $ startcol : UserTableMap :: translateFieldName ( 'UUID' , TableMap :: TYPE_PHPNAME , $ indexType ) ] ; $ this -> uuid = ( null !== $ col ) ? ( string ) $ col : null ; $ col = $ row [ TableMap :: TYPE_NUM == $ indexType ? 2 + $ startcol : UserTableMap :: translateFieldName ( 'UserName' , TableMap :: TYPE_PHPNAME , $ indexType ) ] ; $ this -> username = ( null !== $ col ) ? ( string ) $ col : null ; $ col = $ row [ TableMap :: TYPE_NUM == $ indexType ? 3 + $ startcol : UserTableMap :: translateFieldName ( 'EmailAddress' , TableMap :: TYPE_PHPNAME , $ indexType ) ] ; $ this -> email = ( null !== $ col ) ? ( string ) $ col : null ; $ col = $ row [ TableMap :: TYPE_NUM == $ indexType ? 4 + $ startcol : UserTableMap :: translateFieldName ( 'Password' , TableMap :: TYPE_PHPNAME , $ indexType ) ] ; $ this -> password = ( null !== $ col ) ? ( string ) $ col : null ; $ col = $ row [ TableMap :: TYPE_NUM == $ indexType ? 5 + $ startcol : UserTableMap :: translateFieldName ( 'UserRole' , TableMap :: TYPE_PHPNAME , $ indexType ) ] ; $ this -> role = ( null !== $ col ) ? ( int ) $ col : null ; $ col = $ row [ TableMap :: TYPE_NUM == $ indexType ? 6 + $ startcol : UserTableMap :: translateFieldName ( 'IsVisible' , TableMap :: TYPE_PHPNAME , $ indexType ) ] ; $ this -> visible = ( null !== $ col ) ? ( int ) $ col : null ; $ col = $ row [ TableMap :: TYPE_NUM == $ indexType ? 7 + $ startcol : UserTableMap :: translateFieldName ( 'Status' , TableMap :: TYPE_PHPNAME , $ indexType ) ] ; $ this -> status = ( null !== $ col ) ? ( int ) $ col : null ; $ col = $ row [ TableMap :: TYPE_NUM == $ indexType ? 8 + $ startcol : UserTableMap :: translateFieldName ( 'CreatedAt' , TableMap :: TYPE_PHPNAME , $ indexType ) ] ; if ( $ col === '0000-00-00 00:00:00' ) { $ col = null ; } $ this -> created_at = ( null !== $ col ) ? PropelDateTime :: newInstance ( $ col , null , '\DateTime' ) : null ; $ col = $ row [ TableMap :: TYPE_NUM == $ indexType ? 9 + $ startcol : UserTableMap :: translateFieldName ( 'UpdatedAt' , TableMap :: TYPE_PHPNAME , $ indexType ) ] ; if ( $ col === '0000-00-00 00:00:00' ) { $ col = null ; } $ this -> updated_at = ( null !== $ col ) ? PropelDateTime :: newInstance ( $ col , null , '\DateTime' ) : null ; $ this -> resetModified ( ) ; $ this -> setNew ( false ) ; if ( $ rehydrate ) { $ this -> ensureConsistency ( ) ; } return $ startcol + 10 ; } catch ( Exception $ e ) { throw new PropelException ( " Error populating \User object " , 0 , $ e ) ; } }
Hydrates (populates) the object variables with values from the database resultset.
Hydrates ( populates ) the object variables with values from the database resultset .
// 10 = UserTableMap::NUM_HYDRATE_COLUMNS.