Set gender.

@param \Innova\LexiconBundle\Entity\Gender $gender

@return Inflection
284
public function setGender(\Innova\LexiconBundle\Entity\Gender $gender = null)
    {
        $this->gender = $gender;

        return $this;
    }
1016194
public function setBody($body) {
    if (is_array($body) || is_object($body))
      $this->body = (object) $body;
    else
      $this->body = $body;
    return $this;
  }
10141
public function setLang(\Core\Entity\Language $lang = null)
    {
        $this->lang = $lang;

        return $this;
    }
1025420
private function buildTranslations(ClassMetadataInfo $meta, $gender, $locale)
    {
        $entityName = $this->entityNamer->name($meta->getName());

        $entityTranslatable = $this->translatableManager->isTranslatable($meta->getName());

        $parseDocComments = !in_array($locale, self::$ignoreDocCommentLocales);

        $translations = [
            $entityName => $this->getModel($locale),
        ];
        $translations[$entityName]['entity'] = $this->getPropertyTranslations(
            $meta,
            $parseDocComments,
            $locale,
            $entityTranslatable ? ['translations'] : []
        );

        if ($entityTranslatable) {
            $translations[$entityName]['entity'] = array_merge($translations[$entityName]['entity'], $this->getPropertyTranslations(
                $this->em->getClassMetadata($this->translatableManager->getTranslationClass($meta->getName())),
                $parseDocComments,
                $locale,
                [
                    'locale',
                    'translatable',
                ]
            ));
        }

        $translations[$entityName]['entity'] = $this->normalizePropertyTranslations($translations[$entityName]['entity']);

        $entityTranslation = $this->getClassTranslation($meta->getReflectionClass(), $parseDocComments);

        $cases = $this->getCases($entityTranslation);

        $startsWithAcronym = $this->startsWithAcronym($entityTranslation);

        return $this->replacePlaceholders($translations, [
            '@trans@'                  => $entityTranslation,
            '@trans_lower@'            => $startsWithAcronym ? $entityTranslation : StringsUtil::lowercaseFirst($entityTranslation),
            '@trans_lower_accusative@' => $startsWithAcronym ? $cases['accusative'] : StringsUtil::lowercaseFirst($cases['accusative']),
            '@trans_lower_genitive@'   => $startsWithAcronym ? $cases['genitive'] : StringsUtil::lowercaseFirst($cases['genitive']),
            '@trans_multiple@'         => $cases['multiple'],
        ], array_keys(self::$genders), $gender);
    }
372231
static public function gender($value=null)
    {
        if (!$value) return '保密';
        
        if (is_numeric($value)) {
            return $value == 1 ? '男' : ($value == 2 ? '女' : '保密');
        } else {
            return $value == '男' ? '男' : ($value == '女' ? '女' : '保密');
        }
    }
66826
public function setBody($body)
    {
        $this->body = $body;
        $this->setHeader('Content-Length', strlen($body));

        return $this;
    }
357582
public function setPhoneType(\Sulu\Bundle\ContactBundle\Entity\PhoneType $phoneType)
    {
        $this->phoneType = $phoneType;

        return $this;
    }
474880
def genderize(name, api_token=None):
    """"""

    GENDERIZE_API_URL = "https://api.genderize.io/"
    TOTAL_RETRIES = 10
    MAX_RETRIES = 5
    SLEEP_TIME = 0.25
    STATUS_FORCELIST = [502]

    params = {
        'name': name
    }

    if api_token:
        params['apikey'] = api_token

    session = requests.Session()

    retries = urllib3.util.Retry(total=TOTAL_RETRIES,
                                 connect=MAX_RETRIES,
                                 status=MAX_RETRIES,
                                 status_forcelist=STATUS_FORCELIST,
                                 backoff_factor=SLEEP_TIME,
                                 raise_on_status=True)

    session.mount('http://', requests.adapters.HTTPAdapter(max_retries=retries))
    session.mount('https://', requests.adapters.HTTPAdapter(max_retries=retries))

    r = session.get(GENDERIZE_API_URL, params=params)
    r.raise_for_status()
    result = r.json()

    gender = result['gender']
    prob = result.get('probability', None)

    acc = int(prob * 100) if prob else None

    return gender, acc
39840
public function setEntity($entity)
    {
        $this->debugLog(sprintf('ENTITY: %s', $entity));

        $expectedEntity = $this->makeSQLSafe($this->getParams()['DBPREFIX'] . $entity);

        $this->debugLog(sprintf('SET ENTITY: %s', $expectedEntity));

        // Concatinate the entity with the sqldbprefix value only if not already done.
        if ($expectedEntity !== $this->entity) {
            $this->entity = $expectedEntity;
        }

        return $this;
    }
1043226
public function setDefinition($definition) {
        if ($definition instanceof Definition) {
            $this->definition = $definition;
        }
        else {
            $this->definition->setDefinition($definition);
        }

        $this->consoleDefinitionMerged = false;

        return $this;
    }
32669
public function genderize(array $query)
    {
        $queryString = '?'.http_build_query($query);
        $url = 'http://api.genderize.io/'.$queryString;
        $response = $this->get($url);
        $this->setLastResponse($response);

        return $this->lastResponse->json();
    }
261736
public function setType(?string $type): self
    {
        $this->type                          = $this->validateType($type);
        $this->type_hint || $this->type_hint = $this->type;

        return $this;
    }
246478
public function getGender() : ?string 
    {
        if ( ! $this->hasGender()) {
            $this->setGender($this->getDefaultGender());
        }
        return $this->gender;
    }
901799
public function setGender($gender)
    {
        if(!$this->setModified('gender', $gender)->isModified()){
            return $this;
        }
        $this->gender = $gender;

        return $this;
    }
135523
public function setQuantity($value)
    {
        $this->verifyRequiredField('quantity', $value);
        $this->verifyNonNegativeField('quantity', $value);

        $this->quantity = $value;
        return $this;
    }
632348
protected function setValue($value)
    {
        switch ($value) {
            case self::MALE:
            case self::FEMALE:
                $this->value = $value;
                break;
            default:
                $this->value = self::UNKNOWN;
        }
    }
1296
public function setDialect($dialect)
    {
        if (!Type::isStringLike($dialect)) {
            throw new InvalidArgumentException('Dialect hast to be stringlike, not ' . Type::of($dialect));
        }
        $this->dialect = $dialect;
        return $this;
    }