yii\db\ActiveRelationTrait::normalizeModelKey PHP Method

normalizeModelKey() private method

private normalizeModelKey ( mixed $value ) : string
$value mixed raw key value.
return string normalized key value.
    private function normalizeModelKey($value)
    {
        if (is_object($value) && method_exists($value, '__toString')) {
            // ensure matching to special objects, which are convertable to string, for cross-DBMS relations, for example: `|MongoId`
            $value = $value->__toString();
        }
        return $value;
    }