/** * 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 NagiosDependencyTarget $value A NagiosDependencyTarget object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool(NagiosDependencyTarget $obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { $key = (string) $obj->getId(); } // if key === null self::$instances[$key] = $obj; } }
foreach ($targets_list as $target) { if ($counter % 2) { ?> <tr class="altRow1"> <?php } else { ?> <tr class="altRow2"> <?php } ?> <td height="20" width="80" nowrap="nowrap" class="altLeft"> [ <a href="dependency.php?id=<?php echo $_GET['id']; ?> §ion=targets&request=delete&target_id=<?php echo $target->getId(); ?> " onClick="javascript:return confirmDelete();">Delete</a> ]</td> <td height="20" class="altRight"><?php switch ($target->getType()) { case 'host': print "<strong>Host:</strong> " . $target->getNagiosHost()->getName(); break; case 'hostgroup': print "<strong>Hostgroup:</strong> " . $target->getNagiosHostgroup()->getName(); break; case 'service': print "<strong>Service:</strong> " . $target->getNagiosHost()->getName() . " - " . $target->getNagiosService()->getDescription(); break; } ?>