public function getGenderByValue($value)
    {

        // query whether or not, the requested gender ID is available
        if (isset($this->availableGenders[$value])) {
            return (integer) $this->availableGenders[$value];
        }

        // throw an exception, if not
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf('Found invalid gender %s', $value)
            )
        );
    }
public function getGenderByValue($value)
    {

        // query whether or not, the requested gender ID is available
        if (isset($this->availableGenders[$value])) {
            return (integer) $this->availableGenders[$value];
        }

        // throw an exception, if not
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf('Found invalid gender %s', $value)
            )
        );
    }
public function getGenderByValue ( $ value ) { // query whether or not, the requested gender ID is available if ( isset ( $ this -> availableGenders [ $ value ] ) ) { return ( integer ) $ this -> availableGenders [ $ value ] ; } // throw an exception, if not throw new \ Exception ( $ this -> appendExceptionSuffix ( sprintf ( 'Found invalid gender %s' , $ value ) ) ) ; }
Return's the gender ID for the passed value.

@param string $value The value to return the gender ID for

@return integer The gender ID
@throws \Exception Is thrown, if the gender ID with the requested value is not available
Return s the gender ID for the passed value .