/** * Returns the index associated with a given relationship status value. Makes the * typeCode value lower-case before passing it. * * @param string $value * @return int */ public static function getRelationshipStatusFromValue($value) { if (!self::$relationshipStatusValues) { self::$relationshipStatusValues = array_flip(self::$relationshipStatusCodes); } if (!isset(self::$relationshipStatusValues[$value])) { throw new PropelException('"' . $value . '" is not a valid relationship status.'); } return self::$relationshipStatusValues[strtolower($value)]; }