Code Duplication    Length = 25-25 lines in 5 locations

application/modules/core/models/Map/RouteTableMap.php 1 location

@@ 290-314 (lines=25) @@
287
     * @throws PropelException Any exceptions caught during processing will be
288
     *                         rethrown wrapped into a PropelException.
289
     */
290
    public static function populateObjects(DataFetcherInterface $dataFetcher)
291
    {
292
        $results = array();
293
294
        // set the class once to avoid overhead in the loop
295
        $cls = static::getOMClass(false);
296
        // populate the object(s)
297
        while ($row = $dataFetcher->fetch()) {
298
            $key = RouteTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
299
            if (null !== ($obj = RouteTableMap::getInstanceFromPool($key))) {
300
                // We no longer rehydrate the object, since this can cause data loss.
301
                // See http://www.propelorm.org/ticket/509
302
                // $obj->hydrate($row, 0, true); // rehydrate
303
                $results[] = $obj;
304
            } else {
305
                /** @var Route $obj */
306
                $obj = new $cls();
307
                $obj->hydrate($row);
308
                $results[] = $obj;
309
                RouteTableMap::addInstanceToPool($obj, $key);
310
            } // if key exists
311
        }
312
313
        return $results;
314
    }
315
    /**
316
     * Add all the columns needed to create a new object.
317
     *

application/modules/xbanners/models/Map/BannerImageI18nTableMap.php 1 location

@@ 339-363 (lines=25) @@
336
     * @throws PropelException Any exceptions caught during processing will be
337
     *                         rethrown wrapped into a PropelException.
338
     */
339
    public static function populateObjects(DataFetcherInterface $dataFetcher)
340
    {
341
        $results = array();
342
343
        // set the class once to avoid overhead in the loop
344
        $cls = static::getOMClass(false);
345
        // populate the object(s)
346
        while ($row = $dataFetcher->fetch()) {
347
            $key = BannerImageI18nTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
348
            if (null !== ($obj = BannerImageI18nTableMap::getInstanceFromPool($key))) {
349
                // We no longer rehydrate the object, since this can cause data loss.
350
                // See http://www.propelorm.org/ticket/509
351
                // $obj->hydrate($row, 0, true); // rehydrate
352
                $results[] = $obj;
353
            } else {
354
                /** @var BannerImageI18n $obj */
355
                $obj = new $cls();
356
                $obj->hydrate($row);
357
                $results[] = $obj;
358
                BannerImageI18nTableMap::addInstanceToPool($obj, $key);
359
            } // if key exists
360
        }
361
362
        return $results;
363
    }
364
    /**
365
     * Add all the columns needed to create a new object.
366
     *

application/modules/xbanners/models/Map/BannerImageTableMap.php 1 location

@@ 339-363 (lines=25) @@
336
     * @throws PropelException Any exceptions caught during processing will be
337
     *                         rethrown wrapped into a PropelException.
338
     */
339
    public static function populateObjects(DataFetcherInterface $dataFetcher)
340
    {
341
        $results = array();
342
343
        // set the class once to avoid overhead in the loop
344
        $cls = static::getOMClass(false);
345
        // populate the object(s)
346
        while ($row = $dataFetcher->fetch()) {
347
            $key = BannerImageTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
348
            if (null !== ($obj = BannerImageTableMap::getInstanceFromPool($key))) {
349
                // We no longer rehydrate the object, since this can cause data loss.
350
                // See http://www.propelorm.org/ticket/509
351
                // $obj->hydrate($row, 0, true); // rehydrate
352
                $results[] = $obj;
353
            } else {
354
                /** @var BannerImage $obj */
355
                $obj = new $cls();
356
                $obj->hydrate($row);
357
                $results[] = $obj;
358
                BannerImageTableMap::addInstanceToPool($obj, $key);
359
            } // if key exists
360
        }
361
362
        return $results;
363
    }
364
    /**
365
     * Add all the columns needed to create a new object.
366
     *

application/modules/xbanners/models/Map/BannersI18nTableMap.php 1 location

@@ 321-345 (lines=25) @@
318
     * @throws PropelException Any exceptions caught during processing will be
319
     *                         rethrown wrapped into a PropelException.
320
     */
321
    public static function populateObjects(DataFetcherInterface $dataFetcher)
322
    {
323
        $results = array();
324
325
        // set the class once to avoid overhead in the loop
326
        $cls = static::getOMClass(false);
327
        // populate the object(s)
328
        while ($row = $dataFetcher->fetch()) {
329
            $key = BannersI18nTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
330
            if (null !== ($obj = BannersI18nTableMap::getInstanceFromPool($key))) {
331
                // We no longer rehydrate the object, since this can cause data loss.
332
                // See http://www.propelorm.org/ticket/509
333
                // $obj->hydrate($row, 0, true); // rehydrate
334
                $results[] = $obj;
335
            } else {
336
                /** @var BannersI18n $obj */
337
                $obj = new $cls();
338
                $obj->hydrate($row);
339
                $results[] = $obj;
340
                BannersI18nTableMap::addInstanceToPool($obj, $key);
341
            } // if key exists
342
        }
343
344
        return $results;
345
    }
346
    /**
347
     * Add all the columns needed to create a new object.
348
     *

application/modules/xbanners/models/Map/BannersTableMap.php 1 location

@@ 316-340 (lines=25) @@
313
     * @throws PropelException Any exceptions caught during processing will be
314
     *                         rethrown wrapped into a PropelException.
315
     */
316
    public static function populateObjects(DataFetcherInterface $dataFetcher)
317
    {
318
        $results = array();
319
320
        // set the class once to avoid overhead in the loop
321
        $cls = static::getOMClass(false);
322
        // populate the object(s)
323
        while ($row = $dataFetcher->fetch()) {
324
            $key = BannersTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
325
            if (null !== ($obj = BannersTableMap::getInstanceFromPool($key))) {
326
                // We no longer rehydrate the object, since this can cause data loss.
327
                // See http://www.propelorm.org/ticket/509
328
                // $obj->hydrate($row, 0, true); // rehydrate
329
                $results[] = $obj;
330
            } else {
331
                /** @var Banners $obj */
332
                $obj = new $cls();
333
                $obj->hydrate($row);
334
                $results[] = $obj;
335
                BannersTableMap::addInstanceToPool($obj, $key);
336
            } // if key exists
337
        }
338
339
        return $results;
340
    }
341
    /**
342
     * Add all the columns needed to create a new object.
343
     *