/** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases -- especially when you override doSelect*() * methods in your stub classes -- you may need to explicitly add objects * to the cache in order to ensure that the same objects are always returned by doSelect*() * and retrieveByPK*() calls. * * @param NagiosBrokerModule $value A NagiosBrokerModule object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool(NagiosBrokerModule $obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { $key = (string) $obj->getId(); } // if key === null self::$instances[$key] = $obj; } }
<?php $counter = 0; if ($numOfModules) { foreach ($module_list as $module) { if ($counter % 2) { ?> <tr class="altRow1"> <?php } else { ?> <tr class="altRow2"> <?php } ?> <td height="20" width="80" nowrap="nowrap" class="altLeft"> [ <a href="main.php?section=broker&request=delete&module_id=<?php echo $module->getId(); ?> " onClick="javascript:return confirmDelete();">Delete</a> ]</td> <td height="20" class="altRight"><b><?php echo $module->getLine(); ?> </b></td> </tr> <?php $counter++; } } ?> </table> <br /> <div class="formbox">