예제 #1
0
 /**
  * Filter the query on the confirmation column
  *
  * @param     mixed $confirmation The value to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return PrincipalQuery The current query, for fluid interface
  * @throws PropelException - if the value is not accepted by the enum.
  */
 public function filterByConfirmation($confirmation = null, $comparison = null)
 {
     if (is_scalar($confirmation)) {
         $confirmation = PrincipalPeer::getSqlValueForEnum(PrincipalPeer::CONFIRMATION, $confirmation);
     } elseif (is_array($confirmation)) {
         $convertedValues = array();
         foreach ($confirmation as $value) {
             $convertedValues[] = PrincipalPeer::getSqlValueForEnum(PrincipalPeer::CONFIRMATION, $value);
         }
         $confirmation = $convertedValues;
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
     }
     return $this->addUsingAlias(PrincipalPeer::CONFIRMATION, $confirmation, $comparison);
 }
예제 #2
0
 /**
  * Gets the SQL value for Confirmation ENUM value
  *
  * @param  string $enumVal ENUM value to get SQL value for
  * @return int SQL value
  */
 public static function getConfirmationSqlValue($enumVal)
 {
     return PrincipalPeer::getSqlValueForEnum(PrincipalPeer::CONFIRMATION, $enumVal);
 }