Exemplo n.º 1
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ExportTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ExportTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)];
         $this->ref = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ExportTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
         $this->position = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ExportTableMap::translateFieldName('ExportCategoryId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->export_category_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ExportTableMap::translateFieldName('HandleClass', TableMap::TYPE_PHPNAME, $indexType)];
         $this->handle_class = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ExportTableMap::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 ? 6 + $startcol : ExportTableMap::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 + 7;
         // 7 = ExportTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Thelia\\Model\\Export object", 0, $e);
     }
 }
Exemplo n.º 2
0
 /**
 * 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_CAMELNAME
 *                            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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ApplicationTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ApplicationTableMap::translateFieldName('StudentId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->student_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ApplicationTableMap::translateFieldName('SubjectId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->subject_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ApplicationTableMap::translateFieldName('PeriodId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->period_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ApplicationTableMap::translateFieldName('SchoolYearId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->school_year_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ApplicationTableMap::translateFieldName('ApplicationDate', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00') {
             $col = null;
         }
         $this->application_date = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : ApplicationTableMap::translateFieldName('ExamDate', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00') {
             $col = null;
         }
         $this->exam_date = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : ApplicationTableMap::translateFieldName('ExamTime', TableMap::TYPE_PHPNAME, $indexType)];
         $this->exam_time = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : ApplicationTableMap::translateFieldName('ExamScore', TableMap::TYPE_PHPNAME, $indexType)];
         $this->exam_score = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : ApplicationTableMap::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 ? 10 + $startcol : ApplicationTableMap::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 + 11;
         // 11 = ApplicationTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\App\\Models\\Application'), 0, $e);
     }
 }
Exemplo n.º 3
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ContentTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ContentTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
         $this->visible = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ContentTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
         $this->position = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ContentTableMap::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 ? 4 + $startcol : ContentTableMap::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;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ContentTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
         $this->version = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : ContentTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->version_created_at = null !== $col ? PropelDateTime::newInstance($col, null, '\\DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : ContentTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
         $this->version_created_by = null !== $col ? (string) $col : null;
         $this->resetModified();
         $this->setNew(false);
         if ($rehydrate) {
             $this->ensureConsistency();
         }
         return $startcol + 8;
         // 8 = ContentTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Thelia\\Model\\Content object", 0, $e);
     }
 }
Exemplo n.º 4
0
 /**
 * 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_CAMELNAME
 *                            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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : StudentTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : StudentTableMap::translateFieldName('IdentificationNumber', TableMap::TYPE_PHPNAME, $indexType)];
         $this->identification_number = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : StudentTableMap::translateFieldName('SchoolYearId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->school_year_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : StudentTableMap::translateFieldName('CourseId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->course_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : StudentTableMap::translateFieldName('FirstName', TableMap::TYPE_PHPNAME, $indexType)];
         $this->first_name = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : StudentTableMap::translateFieldName('LastName', TableMap::TYPE_PHPNAME, $indexType)];
         $this->last_name = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : StudentTableMap::translateFieldName('BirthPlace', TableMap::TYPE_PHPNAME, $indexType)];
         $this->birth_place = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : StudentTableMap::translateFieldName('Birthday', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00') {
             $col = null;
         }
         $this->birthday = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : StudentTableMap::translateFieldName('PhoneNumber', TableMap::TYPE_PHPNAME, $indexType)];
         $this->phone_number = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : StudentTableMap::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 ? 10 + $startcol : StudentTableMap::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 + 11;
         // 11 = StudentTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\App\\Models\\Student'), 0, $e);
     }
 }
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : MenuI18nVersionTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : MenuI18nVersionTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
         $this->locale = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : MenuI18nVersionTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
         $this->title = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MenuI18nVersionTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
         $this->description = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MenuI18nVersionTableMap::translateFieldName('Chapo', TableMap::TYPE_PHPNAME, $indexType)];
         $this->chapo = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MenuI18nVersionTableMap::translateFieldName('Postscriptum', TableMap::TYPE_PHPNAME, $indexType)];
         $this->postscriptum = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MenuI18nVersionTableMap::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 ? 7 + $startcol : MenuI18nVersionTableMap::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;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : MenuI18nVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
         $this->version = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : MenuI18nVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->version_created_at = null !== $col ? PropelDateTime::newInstance($col, null, '\\DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : MenuI18nVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
         $this->version_created_by = null !== $col ? (string) $col : null;
         $this->resetModified();
         $this->setNew(false);
         if ($rehydrate) {
             $this->ensureConsistency();
         }
         return $startcol + 11;
         // 11 = MenuI18nVersionTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Menu\\Model\\MenuI18nVersion object", 0, $e);
     }
 }
Exemplo n.º 6
0
 /**
 * 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_CAMELNAME
 *                            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.
 */
 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('Name', TableMap::TYPE_PHPNAME, $indexType)];
         $this->name = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : UserTableMap::translateFieldName('Email', TableMap::TYPE_PHPNAME, $indexType)];
         $this->email = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : UserTableMap::translateFieldName('Password', TableMap::TYPE_PHPNAME, $indexType)];
         $this->password = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : UserTableMap::translateFieldName('Remember', TableMap::TYPE_PHPNAME, $indexType)];
         $this->remember = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : UserTableMap::translateFieldName('AccountType', TableMap::TYPE_PHPNAME, $indexType)];
         $this->account_type = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $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 ? 7 + $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 + 8;
         // 8 = UserTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\Models\\User'), 0, $e);
     }
 }
Exemplo n.º 7
0
 /**
 * 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_CAMELNAME
 *                            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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : GroupTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : GroupTableMap::translateFieldName('Name', TableMap::TYPE_PHPNAME, $indexType)];
         $this->name = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : GroupTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
         $this->description = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : GroupTableMap::translateFieldName('OwnerId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->owner_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : GroupTableMap::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 ? 5 + $startcol : GroupTableMap::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 + 6;
         // 6 = GroupTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\Models\\Group'), 0, $e);
     }
 }
 /**
 * 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_CAMELNAME
 *                            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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : InputErrorTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : InputErrorTableMap::translateFieldName('InputUuid', TableMap::TYPE_PHPNAME, $indexType)];
         $this->input_uuid = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : InputErrorTableMap::translateFieldName('BerAverage', TableMap::TYPE_PHPNAME, $indexType)];
         $this->ber_average = null !== $col ? (double) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : InputErrorTableMap::translateFieldName('UncAverage', TableMap::TYPE_PHPNAME, $indexType)];
         $this->unc_average = null !== $col ? (double) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : InputErrorTableMap::translateFieldName('CumulativeTe', TableMap::TYPE_PHPNAME, $indexType)];
         $this->cumulative_te = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : InputErrorTableMap::translateFieldName('CumulativeCc', TableMap::TYPE_PHPNAME, $indexType)];
         $this->cumulative_cc = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : InputErrorTableMap::translateFieldName('Created', TableMap::TYPE_PHPNAME, $indexType)];
         $this->created = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : InputErrorTableMap::translateFieldName('Modified', TableMap::TYPE_PHPNAME, $indexType)];
         $this->modified = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $this->resetModified();
         $this->setNew(false);
         if ($rehydrate) {
             $this->ensureConsistency();
         }
         return $startcol + 8;
         // 8 = InputErrorTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\Jalle19\\StatusManager\\Database\\InputError'), 0, $e);
     }
 }
Exemplo n.º 9
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : TaxTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : TaxTableMap::translateFieldName('Type', TableMap::TYPE_PHPNAME, $indexType)];
         $this->type = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : TaxTableMap::translateFieldName('SerializedRequirements', TableMap::TYPE_PHPNAME, $indexType)];
         $this->serialized_requirements = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : TaxTableMap::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 ? 4 + $startcol : TaxTableMap::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 + 5;
         // 5 = TaxTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Thelia\\Model\\Tax object", 0, $e);
     }
 }
Exemplo n.º 10
0
 /**
 * 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_CAMELNAME
 *                            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.
 */
 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('IdMember', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id_member = null !== $col ? (int) $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('MemberFrom', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->member_from = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : UserTableMap::translateFieldName('Url', TableMap::TYPE_PHPNAME, $indexType)];
         $this->url = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : UserTableMap::translateFieldName('Email', TableMap::TYPE_PHPNAME, $indexType)];
         $this->email = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : UserTableMap::translateFieldName('EmailConfirmedAt', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->email_confirmed_at = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : UserTableMap::translateFieldName('EmailConfirmToken', TableMap::TYPE_PHPNAME, $indexType)];
         $this->email_confirm_token = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : UserTableMap::translateFieldName('EmailChangeToken', TableMap::TYPE_PHPNAME, $indexType)];
         $this->email_change_token = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : UserTableMap::translateFieldName('Password', TableMap::TYPE_PHPNAME, $indexType)];
         $this->password = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : UserTableMap::translateFieldName('PasswordResetToken', TableMap::TYPE_PHPNAME, $indexType)];
         $this->password_reset_token = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : UserTableMap::translateFieldName('Permissions', TableMap::TYPE_PHPNAME, $indexType)];
         $this->permissions = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : UserTableMap::translateFieldName('SigninCount', TableMap::TYPE_PHPNAME, $indexType)];
         $this->signin_count = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : UserTableMap::translateFieldName('IdImage', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id_image = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : UserTableMap::translateFieldName('LastSigninAt', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->last_signin_at = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $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 ? 16 + $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 + 17;
         // 17 = UserTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\Models\\User'), 0, $e);
     }
 }
Exemplo n.º 11
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : LangTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : LangTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
         $this->title = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : LangTableMap::translateFieldName('Code', TableMap::TYPE_PHPNAME, $indexType)];
         $this->code = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : LangTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
         $this->locale = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : LangTableMap::translateFieldName('Url', TableMap::TYPE_PHPNAME, $indexType)];
         $this->url = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : LangTableMap::translateFieldName('DateFormat', TableMap::TYPE_PHPNAME, $indexType)];
         $this->date_format = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : LangTableMap::translateFieldName('TimeFormat', TableMap::TYPE_PHPNAME, $indexType)];
         $this->time_format = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : LangTableMap::translateFieldName('DatetimeFormat', TableMap::TYPE_PHPNAME, $indexType)];
         $this->datetime_format = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : LangTableMap::translateFieldName('DecimalSeparator', TableMap::TYPE_PHPNAME, $indexType)];
         $this->decimal_separator = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : LangTableMap::translateFieldName('ThousandsSeparator', TableMap::TYPE_PHPNAME, $indexType)];
         $this->thousands_separator = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : LangTableMap::translateFieldName('Decimals', TableMap::TYPE_PHPNAME, $indexType)];
         $this->decimals = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : LangTableMap::translateFieldName('ByDefault', TableMap::TYPE_PHPNAME, $indexType)];
         $this->by_default = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : LangTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
         $this->position = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : LangTableMap::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 ? 14 + $startcol : LangTableMap::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 + 15;
         // 15 = LangTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Thelia\\Model\\Lang object", 0, $e);
     }
 }
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CreditAmountHistoryTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CreditAmountHistoryTableMap::translateFieldName('CreditAccountId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->credit_account_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CreditAmountHistoryTableMap::translateFieldName('Amount', TableMap::TYPE_PHPNAME, $indexType)];
         $this->amount = null !== $col ? (double) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CreditAmountHistoryTableMap::translateFieldName('Who', TableMap::TYPE_PHPNAME, $indexType)];
         $this->who = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CreditAmountHistoryTableMap::translateFieldName('OrderId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->order_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CreditAmountHistoryTableMap::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 ? 6 + $startcol : CreditAmountHistoryTableMap::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 + 7;
         // 7 = CreditAmountHistoryTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\CreditAccount\\Model\\CreditAmountHistory object", 0, $e);
     }
 }
Exemplo n.º 13
0
 /**
  * Sets the value of [time] column to a normalized version of the date/time value specified.
  *
  * @param  mixed $v string, integer (timestamp), or \DateTime value.
  *               Empty strings are treated as NULL.
  * @return $this|\ORM\RowHistory The current object (for fluent API support)
  */
 public function setTime($v)
 {
     $dt = PropelDateTime::newInstance($v, null, '\\DateTime');
     if ($this->time !== null || $dt !== null) {
         if ($dt !== $this->time) {
             $this->time = $dt;
             $this->modifiedColumns[RowHistoryTableMap::COL_TIME] = true;
         }
     }
     // if either are not null
     return $this;
 }
Exemplo n.º 14
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProductSaleElementsTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ProductSaleElementsTableMap::translateFieldName('ProductId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->product_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ProductSaleElementsTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)];
         $this->ref = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ProductSaleElementsTableMap::translateFieldName('Quantity', TableMap::TYPE_PHPNAME, $indexType)];
         $this->quantity = null !== $col ? (double) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ProductSaleElementsTableMap::translateFieldName('Promo', TableMap::TYPE_PHPNAME, $indexType)];
         $this->promo = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ProductSaleElementsTableMap::translateFieldName('Newness', TableMap::TYPE_PHPNAME, $indexType)];
         $this->newness = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : ProductSaleElementsTableMap::translateFieldName('Weight', TableMap::TYPE_PHPNAME, $indexType)];
         $this->weight = null !== $col ? (double) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : ProductSaleElementsTableMap::translateFieldName('IsDefault', TableMap::TYPE_PHPNAME, $indexType)];
         $this->is_default = null !== $col ? (bool) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : ProductSaleElementsTableMap::translateFieldName('EanCode', TableMap::TYPE_PHPNAME, $indexType)];
         $this->ean_code = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : ProductSaleElementsTableMap::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 ? 10 + $startcol : ProductSaleElementsTableMap::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 + 11;
         // 11 = ProductSaleElementsTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Thelia\\Model\\ProductSaleElements object", 0, $e);
     }
 }
Exemplo n.º 15
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : OrderTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : OrderTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)];
         $this->ref = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : OrderTableMap::translateFieldName('CustomerId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->customer_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : OrderTableMap::translateFieldName('InvoiceOrderAddressId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->invoice_order_address_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : OrderTableMap::translateFieldName('DeliveryOrderAddressId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->delivery_order_address_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : OrderTableMap::translateFieldName('InvoiceDate', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00') {
             $col = null;
         }
         $this->invoice_date = null !== $col ? PropelDateTime::newInstance($col, null, '\\DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : OrderTableMap::translateFieldName('CurrencyId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->currency_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : OrderTableMap::translateFieldName('CurrencyRate', TableMap::TYPE_PHPNAME, $indexType)];
         $this->currency_rate = null !== $col ? (double) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : OrderTableMap::translateFieldName('TransactionRef', TableMap::TYPE_PHPNAME, $indexType)];
         $this->transaction_ref = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : OrderTableMap::translateFieldName('DeliveryRef', TableMap::TYPE_PHPNAME, $indexType)];
         $this->delivery_ref = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : OrderTableMap::translateFieldName('InvoiceRef', TableMap::TYPE_PHPNAME, $indexType)];
         $this->invoice_ref = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : OrderTableMap::translateFieldName('Discount', TableMap::TYPE_PHPNAME, $indexType)];
         $this->discount = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : OrderTableMap::translateFieldName('Postage', TableMap::TYPE_PHPNAME, $indexType)];
         $this->postage = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : OrderTableMap::translateFieldName('PostageTax', TableMap::TYPE_PHPNAME, $indexType)];
         $this->postage_tax = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : OrderTableMap::translateFieldName('PostageTaxRuleTitle', TableMap::TYPE_PHPNAME, $indexType)];
         $this->postage_tax_rule_title = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : OrderTableMap::translateFieldName('PaymentModuleId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->payment_module_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : OrderTableMap::translateFieldName('DeliveryModuleId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->delivery_module_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : OrderTableMap::translateFieldName('StatusId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->status_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 18 + $startcol : OrderTableMap::translateFieldName('LangId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->lang_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 19 + $startcol : OrderTableMap::translateFieldName('CartId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->cart_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 20 + $startcol : OrderTableMap::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 ? 21 + $startcol : OrderTableMap::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;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 22 + $startcol : OrderTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
         $this->version = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 23 + $startcol : OrderTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->version_created_at = null !== $col ? PropelDateTime::newInstance($col, null, '\\DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 24 + $startcol : OrderTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
         $this->version_created_by = null !== $col ? (string) $col : null;
         $this->resetModified();
         $this->setNew(false);
         if ($rehydrate) {
             $this->ensureConsistency();
         }
         return $startcol + 25;
         // 25 = OrderTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Thelia\\Model\\Order object", 0, $e);
     }
 }
 /**
 * 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_CAMELNAME
 *                            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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ДатыОбновленийДашбордовTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ДатыОбновленийДашбордовTableMap::translateFieldName('дашборд', TableMap::TYPE_PHPNAME, $indexType)];
         $this->������� = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ДатыОбновленийДашбордовTableMap::translateFieldName('проект', TableMap::TYPE_PHPNAME, $indexType)];
         $this->������ = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ДатыОбновленийДашбордовTableMap::translateFieldName('дата', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00') {
             $col = null;
         }
         $this->���� = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $this->resetModified();
         $this->setNew(false);
         if ($rehydrate) {
             $this->ensureConsistency();
         }
         return $startcol + 4;
         // 4 = ДатыОбновленийДашбордовTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\ДатыОбновленийДашбордов'), 0, $e);
     }
 }
Exemplo n.º 17
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : OrderProductTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : OrderProductTableMap::translateFieldName('OrderId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->order_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : OrderProductTableMap::translateFieldName('ProductRef', TableMap::TYPE_PHPNAME, $indexType)];
         $this->product_ref = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : OrderProductTableMap::translateFieldName('ProductSaleElementsRef', TableMap::TYPE_PHPNAME, $indexType)];
         $this->product_sale_elements_ref = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : OrderProductTableMap::translateFieldName('ProductSaleElementsId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->product_sale_elements_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : OrderProductTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
         $this->title = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : OrderProductTableMap::translateFieldName('Chapo', TableMap::TYPE_PHPNAME, $indexType)];
         $this->chapo = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : OrderProductTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
         $this->description = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : OrderProductTableMap::translateFieldName('Postscriptum', TableMap::TYPE_PHPNAME, $indexType)];
         $this->postscriptum = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : OrderProductTableMap::translateFieldName('Quantity', TableMap::TYPE_PHPNAME, $indexType)];
         $this->quantity = null !== $col ? (double) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : OrderProductTableMap::translateFieldName('Price', TableMap::TYPE_PHPNAME, $indexType)];
         $this->price = null !== $col ? (double) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : OrderProductTableMap::translateFieldName('PromoPrice', TableMap::TYPE_PHPNAME, $indexType)];
         $this->promo_price = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : OrderProductTableMap::translateFieldName('WasNew', TableMap::TYPE_PHPNAME, $indexType)];
         $this->was_new = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : OrderProductTableMap::translateFieldName('WasInPromo', TableMap::TYPE_PHPNAME, $indexType)];
         $this->was_in_promo = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : OrderProductTableMap::translateFieldName('Weight', TableMap::TYPE_PHPNAME, $indexType)];
         $this->weight = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : OrderProductTableMap::translateFieldName('EanCode', TableMap::TYPE_PHPNAME, $indexType)];
         $this->ean_code = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : OrderProductTableMap::translateFieldName('TaxRuleTitle', TableMap::TYPE_PHPNAME, $indexType)];
         $this->tax_rule_title = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : OrderProductTableMap::translateFieldName('TaxRuleDescription', TableMap::TYPE_PHPNAME, $indexType)];
         $this->tax_rule_description = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 18 + $startcol : OrderProductTableMap::translateFieldName('Parent', TableMap::TYPE_PHPNAME, $indexType)];
         $this->parent = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 19 + $startcol : OrderProductTableMap::translateFieldName('Virtual', TableMap::TYPE_PHPNAME, $indexType)];
         $this->virtual = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 20 + $startcol : OrderProductTableMap::translateFieldName('VirtualDocument', TableMap::TYPE_PHPNAME, $indexType)];
         $this->virtual_document = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 21 + $startcol : OrderProductTableMap::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 ? 22 + $startcol : OrderProductTableMap::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 + 23;
         // 23 = OrderProductTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Thelia\\Model\\OrderProduct object", 0, $e);
     }
 }
Exemplo n.º 18
0
 /**
  * Formats a temporal value before binding, given a ColumnMap object
  *
  * @param mixed     $value The temporal value
  * @param ColumnMap $cMap
  *
  * @return string The formatted temporal value
  */
 public function formatTemporalValue($value, ColumnMap $cMap)
 {
     /** @var $dt PropelDateTime */
     if ($dt = PropelDateTime::newInstance($value)) {
         switch ($cMap->getType()) {
             case PropelTypes::TIMESTAMP:
             case PropelTypes::BU_TIMESTAMP:
                 $value = $dt->format($this->getTimestampFormatter());
                 break;
             case PropelTypes::DATE:
             case PropelTypes::BU_DATE:
                 $value = $dt->format($this->getDateFormatter());
                 break;
             case PropelTypes::TIME:
                 $value = $dt->format($this->getTimeFormatter());
                 break;
         }
     }
     return $value;
 }
Exemplo n.º 19
0
 /**
 * 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_CAMELNAME
 *                            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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : MatchTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : MatchTableMap::translateFieldName('Nr', TableMap::TYPE_PHPNAME, $indexType)];
         $this->nr = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : MatchTableMap::translateFieldName('Date', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00') {
             $col = null;
         }
         $this->date = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MatchTableMap::translateFieldName('Result', TableMap::TYPE_PHPNAME, $indexType)];
         $this->result = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MatchTableMap::translateFieldName('Toto', TableMap::TYPE_PHPNAME, $indexType)];
         $this->toto = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MatchTableMap::translateFieldName('ChampionshipId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->championship_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MatchTableMap::translateFieldName('RoundId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->round_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MatchTableMap::translateFieldName('LeagueId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->league_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : MatchTableMap::translateFieldName('HometeamId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->hometeam_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : MatchTableMap::translateFieldName('AwayteamId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->awayteam_id = null !== $col ? (int) $col : null;
         $this->resetModified();
         $this->setNew(false);
         if ($rehydrate) {
             $this->ensureConsistency();
         }
         return $startcol + 10;
         // 10 = MatchTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\Haus23\\Dtp\\Model\\Match'), 0, $e);
     }
 }
Exemplo n.º 20
0
 /**
 * 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_CAMELNAME
 *                            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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : NoteTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : NoteTableMap::translateFieldName('UserId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->user_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : NoteTableMap::translateFieldName('Importance', TableMap::TYPE_PHPNAME, $indexType)];
         $this->importance = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : NoteTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
         $this->title = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : NoteTableMap::translateFieldName('Deadline', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->deadline = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : NoteTableMap::translateFieldName('CategoryId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->category_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : NoteTableMap::translateFieldName('State', TableMap::TYPE_PHPNAME, $indexType)];
         $this->state = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : NoteTableMap::translateFieldName('RepeatAfter', TableMap::TYPE_PHPNAME, $indexType)];
         $this->repeat_after = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : NoteTableMap::translateFieldName('DoneAt', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->done_at = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : NoteTableMap::translateFieldName('Public', TableMap::TYPE_PHPNAME, $indexType)];
         $this->public = null !== $col ? (bool) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : NoteTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
         $this->description = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : NoteTableMap::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 ? 12 + $startcol : NoteTableMap::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 + 13;
         // 13 = NoteTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\Models\\Note'), 0, $e);
     }
 }
Exemplo n.º 21
0
 /**
  * Sets the value of [update_date] column to a normalized version of the date/time value specified.
  *
  * @param  mixed $v string, integer (timestamp), or \DateTime value.
  *               Empty strings are treated as NULL.
  * @return $this|\Alchemy\Component\Cerberus\Model\User The current object (for fluent API support)
  */
 public function setUpdateDate($v)
 {
     $dt = PropelDateTime::newInstance($v, null, '\\DateTime');
     if ($this->update_date !== null || $dt !== null) {
         if ($dt !== $this->update_date) {
             $this->update_date = $dt;
             $this->modifiedColumns[UserTableMap::COL_UPDATE_DATE] = true;
         }
     }
     // if either are not null
     return $this;
 }
Exemplo n.º 22
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : LocalPickupShippingTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : LocalPickupShippingTableMap::translateFieldName('Price', TableMap::TYPE_PHPNAME, $indexType)];
         $this->price = null !== $col ? (double) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : LocalPickupShippingTableMap::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 ? 3 + $startcol : LocalPickupShippingTableMap::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 + 4;
         // 4 = LocalPickupShippingTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\LocalPickup\\Model\\LocalPickupShipping object", 0, $e);
     }
 }
Exemplo n.º 23
0
 /**
 * 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_CAMELNAME
 *                            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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : SessionTableMap::translateFieldName('Token', TableMap::TYPE_PHPNAME, $indexType)];
         $this->token = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : SessionTableMap::translateFieldName('UserId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->user_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : SessionTableMap::translateFieldName('Ip', TableMap::TYPE_PHPNAME, $indexType)];
         $this->ip = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : SessionTableMap::translateFieldName('UserAgent', TableMap::TYPE_PHPNAME, $indexType)];
         $this->user_agent = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : SessionTableMap::translateFieldName('Browser', TableMap::TYPE_PHPNAME, $indexType)];
         $this->browser = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : SessionTableMap::translateFieldName('Device', TableMap::TYPE_PHPNAME, $indexType)];
         $this->device = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : SessionTableMap::translateFieldName('Os', TableMap::TYPE_PHPNAME, $indexType)];
         $this->os = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : SessionTableMap::translateFieldName('Location', TableMap::TYPE_PHPNAME, $indexType)];
         $this->location = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : SessionTableMap::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 : SessionTableMap::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;
         // 10 = SessionTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\keeko\\core\\model\\Session'), 0, $e);
     }
 }
Exemplo n.º 24
0
 /**
 * 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_CAMELNAME
 *                            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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : WpUsersTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : WpUsersTableMap::translateFieldName('UserLogin', TableMap::TYPE_PHPNAME, $indexType)];
         $this->user_login = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : WpUsersTableMap::translateFieldName('UserPass', TableMap::TYPE_PHPNAME, $indexType)];
         $this->user_pass = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : WpUsersTableMap::translateFieldName('UserNicename', TableMap::TYPE_PHPNAME, $indexType)];
         $this->user_nicename = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : WpUsersTableMap::translateFieldName('UserEmail', TableMap::TYPE_PHPNAME, $indexType)];
         $this->user_email = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : WpUsersTableMap::translateFieldName('UserUrl', TableMap::TYPE_PHPNAME, $indexType)];
         $this->user_url = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : WpUsersTableMap::translateFieldName('UserRegistered', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->user_registered = null !== $col ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : WpUsersTableMap::translateFieldName('UserActivationKey', TableMap::TYPE_PHPNAME, $indexType)];
         $this->user_activation_key = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : WpUsersTableMap::translateFieldName('UserStatus', TableMap::TYPE_PHPNAME, $indexType)];
         $this->user_status = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : WpUsersTableMap::translateFieldName('DisplayName', TableMap::TYPE_PHPNAME, $indexType)];
         $this->display_name = null !== $col ? (string) $col : null;
         $this->resetModified();
         $this->setNew(false);
         if ($rehydrate) {
             $this->ensureConsistency();
         }
         return $startcol + 10;
         // 10 = WpUsersTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\WpUsers'), 0, $e);
     }
 }
Exemplo n.º 25
0
 /**
 * 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_CAMELNAME
 *                            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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : WishlistProductTableMap::translateFieldName('WishlistProductId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->wishlist_product_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : WishlistProductTableMap::translateFieldName('WishlistId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->wishlist_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : WishlistProductTableMap::translateFieldName('ProductId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->product_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : WishlistProductTableMap::translateFieldName('WishlistProductComment', TableMap::TYPE_PHPNAME, $indexType)];
         $this->wishlist_product_comment = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : WishlistProductTableMap::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 ? 5 + $startcol : WishlistProductTableMap::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 + 6;
         // 6 = WishlistProductTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException(sprintf('Error populating %s object', '\\App\\Propel\\WishlistProduct'), 0, $e);
     }
 }
Exemplo n.º 26
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : OrderAddressTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : OrderAddressTableMap::translateFieldName('CustomerTitleId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->customer_title_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : OrderAddressTableMap::translateFieldName('Company', TableMap::TYPE_PHPNAME, $indexType)];
         $this->company = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : OrderAddressTableMap::translateFieldName('Firstname', TableMap::TYPE_PHPNAME, $indexType)];
         $this->firstname = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : OrderAddressTableMap::translateFieldName('Lastname', TableMap::TYPE_PHPNAME, $indexType)];
         $this->lastname = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : OrderAddressTableMap::translateFieldName('Address1', TableMap::TYPE_PHPNAME, $indexType)];
         $this->address1 = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : OrderAddressTableMap::translateFieldName('Address2', TableMap::TYPE_PHPNAME, $indexType)];
         $this->address2 = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : OrderAddressTableMap::translateFieldName('Address3', TableMap::TYPE_PHPNAME, $indexType)];
         $this->address3 = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : OrderAddressTableMap::translateFieldName('Zipcode', TableMap::TYPE_PHPNAME, $indexType)];
         $this->zipcode = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : OrderAddressTableMap::translateFieldName('City', TableMap::TYPE_PHPNAME, $indexType)];
         $this->city = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : OrderAddressTableMap::translateFieldName('Phone', TableMap::TYPE_PHPNAME, $indexType)];
         $this->phone = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : OrderAddressTableMap::translateFieldName('Cellphone', TableMap::TYPE_PHPNAME, $indexType)];
         $this->cellphone = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : OrderAddressTableMap::translateFieldName('CountryId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->country_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : OrderAddressTableMap::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 ? 14 + $startcol : OrderAddressTableMap::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 + 15;
         // 15 = OrderAddressTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Thelia\\Model\\OrderAddress object", 0, $e);
     }
 }
Exemplo n.º 27
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CommentTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CommentTableMap::translateFieldName('Username', TableMap::TYPE_PHPNAME, $indexType)];
         $this->username = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CommentTableMap::translateFieldName('CustomerId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->customer_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CommentTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)];
         $this->ref = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CommentTableMap::translateFieldName('RefId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->ref_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CommentTableMap::translateFieldName('Email', TableMap::TYPE_PHPNAME, $indexType)];
         $this->email = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CommentTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
         $this->title = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CommentTableMap::translateFieldName('Content', TableMap::TYPE_PHPNAME, $indexType)];
         $this->content = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CommentTableMap::translateFieldName('Rating', TableMap::TYPE_PHPNAME, $indexType)];
         $this->rating = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CommentTableMap::translateFieldName('Status', TableMap::TYPE_PHPNAME, $indexType)];
         $this->status = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CommentTableMap::translateFieldName('Verified', TableMap::TYPE_PHPNAME, $indexType)];
         $this->verified = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CommentTableMap::translateFieldName('Abuse', TableMap::TYPE_PHPNAME, $indexType)];
         $this->abuse = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CommentTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
         $this->locale = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CommentTableMap::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 ? 14 + $startcol : CommentTableMap::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 + 15;
         // 15 = CommentTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Comment\\Model\\Comment object", 0, $e);
     }
 }
Exemplo n.º 28
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CustomerTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CustomerTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)];
         $this->ref = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CustomerTableMap::translateFieldName('TitleId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->title_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CustomerTableMap::translateFieldName('Firstname', TableMap::TYPE_PHPNAME, $indexType)];
         $this->firstname = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CustomerTableMap::translateFieldName('Lastname', TableMap::TYPE_PHPNAME, $indexType)];
         $this->lastname = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CustomerTableMap::translateFieldName('Email', TableMap::TYPE_PHPNAME, $indexType)];
         $this->email = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CustomerTableMap::translateFieldName('Password', TableMap::TYPE_PHPNAME, $indexType)];
         $this->password = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CustomerTableMap::translateFieldName('Algo', TableMap::TYPE_PHPNAME, $indexType)];
         $this->algo = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CustomerTableMap::translateFieldName('Reseller', TableMap::TYPE_PHPNAME, $indexType)];
         $this->reseller = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CustomerTableMap::translateFieldName('Lang', TableMap::TYPE_PHPNAME, $indexType)];
         $this->lang = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CustomerTableMap::translateFieldName('Sponsor', TableMap::TYPE_PHPNAME, $indexType)];
         $this->sponsor = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CustomerTableMap::translateFieldName('Discount', TableMap::TYPE_PHPNAME, $indexType)];
         $this->discount = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CustomerTableMap::translateFieldName('RememberMeToken', TableMap::TYPE_PHPNAME, $indexType)];
         $this->remember_me_token = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CustomerTableMap::translateFieldName('RememberMeSerial', TableMap::TYPE_PHPNAME, $indexType)];
         $this->remember_me_serial = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CustomerTableMap::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 ? 15 + $startcol : CustomerTableMap::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;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : CustomerTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
         $this->version = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : CustomerTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->version_created_at = null !== $col ? PropelDateTime::newInstance($col, null, '\\DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 18 + $startcol : CustomerTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
         $this->version_created_by = null !== $col ? (string) $col : null;
         $this->resetModified();
         $this->setNew(false);
         if ($rehydrate) {
             $this->ensureConsistency();
         }
         return $startcol + 19;
         // 19 = CustomerTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Thelia\\Model\\Customer object", 0, $e);
     }
 }
Exemplo n.º 29
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CouponVersionTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
         $this->id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CouponVersionTableMap::translateFieldName('Code', TableMap::TYPE_PHPNAME, $indexType)];
         $this->code = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CouponVersionTableMap::translateFieldName('Type', TableMap::TYPE_PHPNAME, $indexType)];
         $this->type = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponVersionTableMap::translateFieldName('SerializedEffects', TableMap::TYPE_PHPNAME, $indexType)];
         $this->serialized_effects = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponVersionTableMap::translateFieldName('IsEnabled', TableMap::TYPE_PHPNAME, $indexType)];
         $this->is_enabled = null !== $col ? (bool) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CouponVersionTableMap::translateFieldName('StartDate', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->start_date = null !== $col ? PropelDateTime::newInstance($col, null, '\\DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CouponVersionTableMap::translateFieldName('ExpirationDate', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->expiration_date = null !== $col ? PropelDateTime::newInstance($col, null, '\\DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CouponVersionTableMap::translateFieldName('MaxUsage', TableMap::TYPE_PHPNAME, $indexType)];
         $this->max_usage = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CouponVersionTableMap::translateFieldName('IsCumulative', TableMap::TYPE_PHPNAME, $indexType)];
         $this->is_cumulative = null !== $col ? (bool) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CouponVersionTableMap::translateFieldName('IsRemovingPostage', TableMap::TYPE_PHPNAME, $indexType)];
         $this->is_removing_postage = null !== $col ? (bool) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CouponVersionTableMap::translateFieldName('IsAvailableOnSpecialOffers', TableMap::TYPE_PHPNAME, $indexType)];
         $this->is_available_on_special_offers = null !== $col ? (bool) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CouponVersionTableMap::translateFieldName('IsUsed', TableMap::TYPE_PHPNAME, $indexType)];
         $this->is_used = null !== $col ? (bool) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CouponVersionTableMap::translateFieldName('SerializedConditions', TableMap::TYPE_PHPNAME, $indexType)];
         $this->serialized_conditions = null !== $col ? (string) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CouponVersionTableMap::translateFieldName('PerCustomerUsageCount', TableMap::TYPE_PHPNAME, $indexType)];
         $this->per_customer_usage_count = null !== $col ? (bool) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CouponVersionTableMap::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 ? 15 + $startcol : CouponVersionTableMap::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;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : CouponVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
         $this->version = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : CouponVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
         if ($col === '0000-00-00 00:00:00') {
             $col = null;
         }
         $this->version_created_at = null !== $col ? PropelDateTime::newInstance($col, null, '\\DateTime') : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 18 + $startcol : CouponVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
         $this->version_created_by = null !== $col ? (string) $col : null;
         $this->resetModified();
         $this->setNew(false);
         if ($rehydrate) {
             $this->ensureConsistency();
         }
         return $startcol + 19;
         // 19 = CouponVersionTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Thelia\\Model\\CouponVersion object", 0, $e);
     }
 }
Exemplo n.º 30
0
 /**
 * 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.
 */
 public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
 {
     try {
         $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : AttributeCombinationTableMap::translateFieldName('AttributeId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->attribute_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : AttributeCombinationTableMap::translateFieldName('AttributeAvId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->attribute_av_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : AttributeCombinationTableMap::translateFieldName('ProductSaleElementsId', TableMap::TYPE_PHPNAME, $indexType)];
         $this->product_sale_elements_id = null !== $col ? (int) $col : null;
         $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : AttributeCombinationTableMap::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 ? 4 + $startcol : AttributeCombinationTableMap::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 + 5;
         // 5 = AttributeCombinationTableMap::NUM_HYDRATE_COLUMNS.
     } catch (Exception $e) {
         throw new PropelException("Error populating \\Thelia\\Model\\AttributeCombination object", 0, $e);
     }
 }