Exemplo n.º 1
0
		<td><?php 
echo NagiosServiceGroupPeer::doCount(new Criteria());
?>
</td>
	</tr>
	<tr>
		<td><strong>Total Nagios Host Templates:</strong></td>
		<td><?php 
echo NagiosHostTemplatePeer::doCount(new Criteria());
?>
</td>
	</tr>
	<tr class="odd">
		<td><strong>Total Nagios Service Templates:</strong></td>
		<td><?php 
echo NagiosServiceTemplatePeer::doCount(new Criteria());
?>
</td>
	</tr>
	<tr>
		<td><strong>Total Nagios Hosts:</strong></td>
		<td><?php 
echo NagiosHostPeer::doCount(new Criteria());
?>
</td>
	</tr>
	<tr class="odd">
		<td><strong>Total Nagios Services:</strong></td>
		<td><?php 
echo NagiosServicePeer::doCountAll();
?>
Exemplo n.º 2
0
 /**
  * Returns the number of related NagiosServiceTemplate objects.
  *
  * @param      Criteria $criteria
  * @param      boolean $distinct
  * @param      PropelPDO $con
  * @return     int Count of related NagiosServiceTemplate objects.
  * @throws     PropelException
  */
 public function countNagiosServiceTemplatesRelatedByNotificationPeriod(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
 {
     if ($criteria === null) {
         $criteria = new Criteria(NagiosTimeperiodPeer::DATABASE_NAME);
     } else {
         $criteria = clone $criteria;
     }
     if ($distinct) {
         $criteria->setDistinct();
     }
     $count = null;
     if ($this->collNagiosServiceTemplatesRelatedByNotificationPeriod === null) {
         if ($this->isNew()) {
             $count = 0;
         } else {
             $criteria->add(NagiosServiceTemplatePeer::NOTIFICATION_PERIOD, $this->id);
             $count = NagiosServiceTemplatePeer::doCount($criteria, $con);
         }
     } else {
         // criteria has no effect for a new object
         if (!$this->isNew()) {
             // the following code is to determine if a new query is
             // called for.  If the criteria is the same as the last
             // one, just return count of the collection.
             $criteria->add(NagiosServiceTemplatePeer::NOTIFICATION_PERIOD, $this->id);
             if (!isset($this->lastNagiosServiceTemplateRelatedByNotificationPeriodCriteria) || !$this->lastNagiosServiceTemplateRelatedByNotificationPeriodCriteria->equals($criteria)) {
                 $count = NagiosServiceTemplatePeer::doCount($criteria, $con);
             } else {
                 $count = count($this->collNagiosServiceTemplatesRelatedByNotificationPeriod);
             }
         } else {
             $count = count($this->collNagiosServiceTemplatesRelatedByNotificationPeriod);
         }
     }
     return $count;
 }