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)
            )
        );
    }