DiscordPHP Documentation

GuildPreview extends Part
in package
uses GuildTrait

A guild can be previewed before joining via Membership Screening or the directory.

Tags
link
https://discord.com/developers/docs/resources/guild#guild-preview-object-guild-preview-structure
@property

?string|null $icon_hash The icon hash for the guild.

@property

?string|null $splash_hash The splash hash for the guild.

Table of Contents

Properties

$approximate_member_count  : int|null
$approximate_presence_count  : int|null
$created  : bool
Is the part already created in the Discord servers?
$description  : string|null
$discovery_splash  : string|null
$emojis  : EmojiRepository
$feature_animated_banner  : bool
$feature_animated_icon  : bool
$feature_application_command_permissions_v2  : bool
$feature_auto_moderation  : bool
$feature_banner  : bool
$feature_community  : bool
$feature_creator_monetizable_provisional  : bool
$feature_creator_store_page  : bool
$feature_developer_support_server  : bool
$feature_discoverable  : bool
$feature_enhanced_role_colors  : bool
$feature_featurable  : bool
$feature_guests_enabled  : bool
$feature_has_directory_entry  : bool
$feature_invite_splash  : bool
$feature_invites_disabled  : bool
$feature_linked_to_hub  : bool
$feature_member_verification_gate_enabled  : bool
$feature_monetization_enabled  : bool
$feature_more_soundboard  : bool
$feature_more_stickers  : bool
$feature_news  : bool
$feature_partnered  : bool
$feature_preview_enabled  : bool
$feature_private_threads  : bool
$feature_raid_alerts_disabled  : bool
$feature_raid_alerts_enabled  : bool
$feature_role_icons  : bool
$feature_role_subscriptions_available_for_purchase  : bool
$feature_role_subscriptions_enabled  : bool
$feature_soundboard  : bool
$feature_ticketed_events_enabled  : bool
$feature_vanity_url  : bool
$feature_verified  : bool
$feature_vip_regions  : bool
$feature_welcome_screen_enabled  : bool
$features  : array<string|int, string>
$icon  : string|null
$id  : string
$name  : string
$scriptData  : mixed
Custom script data.
$splash  : string|null
$stickers  : StickerRepository
$attributes  : array<string|int, mixed>
The parts attributes.
$discord  : Discord
The Discord client.
$factory  : Factory
The factory.
$fillable  : array<string|int, mixed>
The parts fillable attributes.
$hidden  : array<string|int, mixed>
Attributes that are hidden from debug info.
$http  : Http
The HTTP client.
$repositories  : array<string|int, mixed>
An array of repositories that can exist in a part.
$repositories_cache  : array<string|int, mixed>
An array of repositories.
$visible  : array<string|int, mixed>
Attributes which are visible from debug info.

Methods

__construct()  : mixed
Create a new part instance.
__debugInfo()  : array<string|int, mixed>
__get()  : mixed
Handles dynamic get calls onto the part.
__serialize()  : array<string|int, mixed>
__set()  : void
Handles dynamic set calls onto the part.
__toString()  : string
Converts the part to a string.
__unserialize()  : void
fetch()  : PromiseInterface<string|int, static>
Fetches any missing information about the part from Discord's servers.
fill()  : void
Fills the parts attributes from an array.
getCreatableAttributes()  : array<string|int, mixed>
Returns the attributes needed to create.
getDiscord()  : Discord
Get the Discord instance that owns this Part.
getIconAttribute()  : string|null
Returns the guilds icon.
getPublicAttributes()  : array<string|int, mixed>
Returns an array of public attributes.
getRawAttributes()  : array<string|int, mixed>
Returns an array of raw attributes.
getRepositoryAttributes()  : array<string|int, mixed>
{@inheritDoc}
getSplashAttribute()  : string|null
Returns the guild splash.
getUpdatableAttributes()  : array<string|int, mixed>
Returns the updatable attributes.
isPartial()  : bool
Whether the part is considered partial i.e. missing information which can be fetched from Discord.
jsonSerialize()  : array<string|int, mixed>
Provides data when the part is encoded into JSON. Used for JsonSerializable.
offsetExists()  : bool
Checks if an attribute exists via key. Used for ArrayAccess.
offsetGet()  : mixed
Gets an attribute via key. Used for ArrayAccess.
offsetSet()  : void
Sets an attribute via key. Used for ArrayAccess.
offsetUnset()  : void
Unsets an attribute via key. Used for ArrayAccess.
serialize()  : string|null
Serializes the data. Used for Serializable.
unserialize()  : void
Unserializes some data and stores it. Used for Serializable.
afterConstruct()  : void
Called after the part has been constructed.
getFeatureAnimatedBannerAttribute()  : bool
getFeatureAnimatedIconAttribute()  : bool
getFeatureApplicationCommandPermissionsV2()  : bool
getFeatureAutoModerationAttribute()  : bool
getFeatureBannerAttribute()  : bool
getFeatureCommunityAttribute()  : bool
getFeatureCreatorMonetizableProvisionalAttribute()  : bool
getFeatureCreatorStorePageAttribute()  : bool
getFeatureDeveloperSupportServerAttribute()  : bool
getFeatureDiscoverableAttribute()  : bool
getFeatureEnhancedRoleColorsAttribute()  : bool
getFeatureFeaturableAttribute()  : bool
getFeatureGuestEnabledAttribute()  : bool
getFeatureHasDirectoryEntryAttribute()  : bool
getFeatureInvitesDisabledAttribute()  : bool
getFeatureInviteSplashAttribute()  : bool
getFeatureLinkedToHubAttribute()  : bool
getFeatureMemberVerificationGateEnabledAttribute()  : bool
getFeatureMonetizationEnabledAttribute()  : bool
getFeatureMoreSoundboardAttribute()  : bool
getFeatureMoreStickersAttribute()  : bool
getFeatureNewsAttribute()  : bool
getFeaturePartneredAttribute()  : bool
getFeaturePreviewEnabledAttribute()  : bool
getFeaturePrivateThreadsAttribute()  : bool
getFeatureRaidAlertsDisabledAttribute()  : bool
getFeatureRaidAlertsEnabledAttribute()  : bool
getFeatureRoleIconsAttribute()  : bool
getFeatureRoleSubscriptionsAvailableForPurchaseAttribute()  : bool
getFeatureRoleSubscriptionsEnabledAttribute()  : bool
getFeatureSoundboardAttribute()  : bool
getFeatureTicketedEventsEnabledAttribute()  : bool
getFeatureVanityUrlAttribute()  : bool
getFeatureVerifiedAttribute()  : bool
getFeatureVipRegionsAttribute()  : bool
getFeatureWelcomeScreenEnabledAttribute()  : bool
getIconHashAttribute()  : string|null
Returns the guild icon hash.
getSplashHashAttribute()  : string|null
Returns the guild splash hash.
makeOptionalAttributes()  : array<string|int, mixed>
Return key-value attributes if it has been filled.
checkForGetMutator()  : string|false
Checks if there is a get mutator present.
checkForSetMutator()  : string|false
Checks if there is a set mutator present.
getAttribute()  : mixed
Gets an attribute on the part.
setAttribute()  : void
Sets an attribute on the part.
studly()  : string
Converts a string to studlyCase.

Properties

$approximate_member_count

public int|null $approximate_member_count

Approximate number of members in this guild, returned from the GET /guilds/ endpoint when with_counts is true.

$approximate_presence_count

public int|null $approximate_presence_count

Approximate number of non-offline members in this guild, returned from the GET /guilds/ endpoint when with_counts is true.

$created

Is the part already created in the Discord servers?

public bool $created = false

Whether the part has been created.

$description

public string|null $description

The description of the guild.

$discovery_splash

public string|null $discovery_splash

Discovery splash hash. Only for discoverable guilds.

$feature_animated_banner read-only

public bool $feature_animated_banner

Guild has access to set an animated guild banner image.

$feature_animated_icon read-only

public bool $feature_animated_icon

Guild has access to set an animated guild icon.

$feature_application_command_permissions_v2 read-only

public bool $feature_application_command_permissions_v2

Guild is using the old permissions configuration behavior.

$feature_auto_moderation read-only

public bool $feature_auto_moderation

Guild has set up auto moderation rules.

$feature_banner read-only

public bool $feature_banner

Guild has access to set a guild banner image.

$feature_community read-only

public bool $feature_community

Guild can enable welcome screen, Membership Screening, stage channels and discovery, and receives community updates.

$feature_creator_monetizable_provisional read-only

public bool $feature_creator_monetizable_provisional

Guild has enabled monetization.

$feature_creator_store_page read-only

public bool $feature_creator_store_page

Guild has enabled the role subscription promo page.

$feature_developer_support_server read-only

public bool $feature_developer_support_server

Guild has been set as a support server on the App Directory.

$feature_discoverable read-only

public bool $feature_discoverable

Guild is able to be discovered in the directory.

$feature_enhanced_role_colors read-only

public bool $feature_enhanced_role_colors

Guild is able to set gradient colors to roles.

$feature_featurable read-only

public bool $feature_featurable

Guild is able to be featured in the directory.

$feature_guests_enabled read-only

public bool $feature_guests_enabled

Guild has access to guest invites.

$feature_has_directory_entry read-only

public bool $feature_has_directory_entry

Guild is listed in a directory channel.

$feature_invite_splash read-only

public bool $feature_invite_splash

Guild has access to set an invite splash background.

$feature_invites_disabled read-only

public bool $feature_invites_disabled

Guild has paused invites, preventing new users from joining.

$feature_linked_to_hub read-only

public bool $feature_linked_to_hub

Guild is in a Student Hub.

$feature_member_verification_gate_enabled read-only

public bool $feature_member_verification_gate_enabled

Guild has enabled membership screening.

$feature_monetization_enabled read-only

public bool $feature_monetization_enabled

Guild has enabled monetization.

$feature_more_soundboard read-only

public bool $feature_more_soundboard

Guild has increased custom soundboard sound slots.

$feature_more_stickers read-only

public bool $feature_more_stickers

Guild has increased custom sticker slots.

$feature_news read-only

public bool $feature_news

Guild has access to create news channels.

$feature_partnered read-only

public bool $feature_partnered

Guild is partnered.

$feature_preview_enabled read-only

public bool $feature_preview_enabled

Guild can be previewed before joining via membership screening or the directory.

$feature_private_threads read-only

public bool $feature_private_threads

Guild has access to create private threads.

$feature_raid_alerts_disabled read-only

public bool $feature_raid_alerts_disabled

Guild has disabled alerts for join raids in the configured safety alerts channel.

$feature_raid_alerts_enabled read-only

public bool $feature_raid_alerts_enabled

Guild has enabled alerts for join raids in the configured safety alerts channel.

$feature_role_icons read-only

public bool $feature_role_icons

Guild is able to set role icons.

$feature_role_subscriptions_available_for_purchase read-only

public bool $feature_role_subscriptions_available_for_purchase

Guild has role subscriptions that can be purchased.

$feature_role_subscriptions_enabled read-only

public bool $feature_role_subscriptions_enabled

Guild has enabled role subscriptions.

$feature_soundboard read-only

public bool $feature_soundboard

Guild has created soundboard sounds.

$feature_ticketed_events_enabled read-only

public bool $feature_ticketed_events_enabled

Guild has enabled ticketed events.

$feature_vanity_url read-only

public bool $feature_vanity_url

Guild has access to set a vanity url.

$feature_verified read-only

public bool $feature_verified

Guild is verified.

$feature_vip_regions read-only

public bool $feature_vip_regions

Guild has access to set 384kbps bitrate in voice.

$feature_welcome_screen_enabled read-only

public bool $feature_welcome_screen_enabled

Guild has enabled the welcome screen.

$features

public array<string|int, string> $features

An array of features that the guild has.

$icon

public string|null $icon

The URL to the guild icon.

$id

public string $id

The unique identifier of the guild.

$scriptData

Custom script data.

Relying on this variable with dynamic caching is discouraged.

public mixed $scriptData

Used for storing custom information, used by end products.

$splash

public string|null $splash

The URL to the guild splash.

$attributes

The parts attributes.

protected array<string|int, mixed> $attributes = []

The parts attributes and content.

$discord

The Discord client.

protected Discord $discord

Client.

$fillable

The parts fillable attributes.

protected array<string|int, mixed> $fillable = ['id', 'name', 'icon', 'splash', 'discovery_splash', 'emojis', 'features', 'approximate_member_count', 'approximate_presence_count', 'description', 'stickers']

The array of attributes that can be mass-assigned.

$hidden

Attributes that are hidden from debug info.

protected array<string|int, mixed> $hidden = []

Attributes that are hidden from public.

$http

The HTTP client.

protected Http $http

Client.

$repositories

An array of repositories that can exist in a part.

protected array<string|int, mixed> $repositories = ['emojis' => \Discord\Repository\Guild\EmojiRepository::class, 'stickers' => \Discord\Repository\Guild\StickerRepository::class]

Repositories.

$repositories_cache

An array of repositories.

protected array<string|int, mixed> $repositories_cache = []

$visible

Attributes which are visible from debug info.

protected array<string|int, mixed> $visible = ['feature_animated_banner', 'feature_animated_icon', 'feature_application_command_permissions_v2', 'feature_auto_moderation', 'feature_banner', 'feature_community', 'feature_creator_monetizable_provisional', 'feature_creator_store_page', 'feature_developer_support_server', 'feature_discoverable', 'feature_featurable', 'feature_has_directory_entry', 'feature_invites_disabled', 'feature_invite_splash', 'feature_linked_to_hub', 'feature_member_verification_gate_enabled', 'feature_more_soundboard', 'feature_more_stickers', 'feature_monetization_enabled', 'feature_more_stickers', 'feature_news', 'feature_partnered', 'feature_preview_enabled', 'feature_private_threads', 'feature_raid_alerts_enabled', 'feature_raid_alerts_disabled', 'feature_role_icons', 'feature_role_subscriptions_available_for_purchase', 'feature_role_subscriptions_enabled', 'feature_soundboard', 'feature_ticketed_events_enabled', 'feature_vanity_url', 'feature_verified', 'feature_vip_regions', 'feature_welcome_screen_enabled', 'feature_guest_enabled', 'feature_enhanced_role_colors']

Methods

__construct()

Create a new part instance.

public __construct(Discord $discord[, array<string|int, mixed> $attributes = [] ][, bool $created = false ]) : mixed
Parameters
$discord : Discord

The Discord client.

$attributes : array<string|int, mixed> = []

An array of attributes to build the part.

$created : bool = false

Whether the part has already been created.

__debugInfo()

public __debugInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>

__get()

Handles dynamic get calls onto the part.

public __get(string $key) : mixed
Parameters
$key : string

The attributes key.

Tags
throws
Exception
see
Part::getAttribute()

This function forwards onto getAttribute.

Return values
mixed

The value of the attribute.

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__set()

Handles dynamic set calls onto the part.

public __set(string $key, mixed $value) : void
Parameters
$key : string

The attributes key.

$value : mixed

The attributes value.

Tags
see
self::setAttribute()

This function forwards onto setAttribute.

__toString()

Converts the part to a string.

public __toString() : string
Tags
throws
Exception
see
Part::getPublicAttributes()

This function encodes getPublicAttributes into JSON.

Return values
string

A JSON string of attributes.

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

fetch()

Fetches any missing information about the part from Discord's servers.

public fetch() : PromiseInterface<string|int, static>
Tags
throws
RuntimeException

The part is not fetchable.

Return values
PromiseInterface<string|int, static>

fill()

Fills the parts attributes from an array.

public fill(array<string|int, mixed> $attributes) : void
Parameters
$attributes : array<string|int, mixed>

An array of attributes to build the part.

Tags
see
self::setAttribute()

getCreatableAttributes()

Returns the attributes needed to create.

public getCreatableAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getIconAttribute()

Returns the guilds icon.

public getIconAttribute([string|null $format = null ][, int $size = 1024 ]) : string|null
Parameters
$format : string|null = null

The image format.

$size : int = 1024

The size of the image.

Return values
string|null

The URL to the guild icon or null.

getPublicAttributes()

Returns an array of public attributes.

public getPublicAttributes() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

An array of public attributes.

getRawAttributes()

Returns an array of raw attributes.

public getRawAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

Raw attributes.

getRepositoryAttributes()

{@inheritDoc}

public getRepositoryAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSplashAttribute()

Returns the guild splash.

public getSplashAttribute([string $format = 'webp' ][, int $size = 2048 ]) : string|null
Parameters
$format : string = 'webp'

The image format.

$size : int = 2048

The size of the image.

Return values
string|null

The URL to the guild splash or null.

getUpdatableAttributes()

Returns the updatable attributes.

public getUpdatableAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

isPartial()

Whether the part is considered partial i.e. missing information which can be fetched from Discord.

public isPartial() : bool
Return values
bool

jsonSerialize()

Provides data when the part is encoded into JSON. Used for JsonSerializable.

public jsonSerialize() : array<string|int, mixed>
Tags
throws
Exception
see
Part::getPublicAttributes()

This function forwards onto getPublicAttributes.

Return values
array<string|int, mixed>

An array of public attributes.

offsetExists()

Checks if an attribute exists via key. Used for ArrayAccess.

public offsetExists(string $key) : bool
Parameters
$key : string

The attribute key.

Return values
bool

Whether the offset exists.

offsetGet()

Gets an attribute via key. Used for ArrayAccess.

public offsetGet(string $key) : mixed
Parameters
$key : string

The attribute key.

Tags
throws
Exception
see
Part::getAttribute()

This function forwards onto getAttribute.

Attributes
#[ReturnTypeWillChange]

offsetSet()

Sets an attribute via key. Used for ArrayAccess.

public offsetSet(string $key, mixed $value) : void
Parameters
$key : string

The attribute key.

$value : mixed

The attribute value.

Tags
see
Part::setAttribute()

This function forwards onto setAttribute.

offsetUnset()

Unsets an attribute via key. Used for ArrayAccess.

public offsetUnset(string $key) : void
Parameters
$key : string

The attribute key.

serialize()

Serializes the data. Used for Serializable.

public serialize() : string|null
Return values
string|null

A string of serialized data.

unserialize()

Unserializes some data and stores it. Used for Serializable.

public unserialize(string $data) : void
Parameters
$data : string

Some serialized data.

Tags
see
Part::setAttribute()

The unserialized data is stored with setAttribute.

afterConstruct()

Called after the part has been constructed.

protected afterConstruct() : void

getFeatureAnimatedBannerAttribute()

protected getFeatureAnimatedBannerAttribute() : bool
Return values
bool

getFeatureAnimatedIconAttribute()

protected getFeatureAnimatedIconAttribute() : bool
Return values
bool

getFeatureApplicationCommandPermissionsV2()

protected getFeatureApplicationCommandPermissionsV2() : bool
Return values
bool

getFeatureAutoModerationAttribute()

protected getFeatureAutoModerationAttribute() : bool
Return values
bool

getFeatureBannerAttribute()

protected getFeatureBannerAttribute() : bool
Return values
bool

getFeatureCommunityAttribute()

protected getFeatureCommunityAttribute() : bool
Return values
bool

getFeatureCreatorMonetizableProvisionalAttribute()

protected getFeatureCreatorMonetizableProvisionalAttribute() : bool
Return values
bool

getFeatureCreatorStorePageAttribute()

protected getFeatureCreatorStorePageAttribute() : bool
Return values
bool

getFeatureDeveloperSupportServerAttribute()

protected getFeatureDeveloperSupportServerAttribute() : bool
Return values
bool

getFeatureDiscoverableAttribute()

protected getFeatureDiscoverableAttribute() : bool
Return values
bool

getFeatureEnhancedRoleColorsAttribute()

protected getFeatureEnhancedRoleColorsAttribute() : bool
Return values
bool

getFeatureFeaturableAttribute()

protected getFeatureFeaturableAttribute() : bool
Return values
bool

getFeatureGuestEnabledAttribute()

protected getFeatureGuestEnabledAttribute() : bool
Return values
bool

getFeatureHasDirectoryEntryAttribute()

protected getFeatureHasDirectoryEntryAttribute() : bool
Return values
bool

getFeatureInvitesDisabledAttribute()

protected getFeatureInvitesDisabledAttribute() : bool
Return values
bool

getFeatureInviteSplashAttribute()

protected getFeatureInviteSplashAttribute() : bool
Return values
bool

getFeatureLinkedToHubAttribute()

protected getFeatureLinkedToHubAttribute() : bool
Return values
bool

getFeatureMemberVerificationGateEnabledAttribute()

protected getFeatureMemberVerificationGateEnabledAttribute() : bool
Return values
bool

getFeatureMonetizationEnabledAttribute()

protected getFeatureMonetizationEnabledAttribute() : bool
Return values
bool

getFeatureMoreSoundboardAttribute()

protected getFeatureMoreSoundboardAttribute() : bool
Return values
bool

getFeatureMoreStickersAttribute()

protected getFeatureMoreStickersAttribute() : bool
Return values
bool

getFeatureNewsAttribute()

protected getFeatureNewsAttribute() : bool
Return values
bool

getFeaturePartneredAttribute()

protected getFeaturePartneredAttribute() : bool
Return values
bool

getFeaturePreviewEnabledAttribute()

protected getFeaturePreviewEnabledAttribute() : bool
Return values
bool

getFeaturePrivateThreadsAttribute()

protected getFeaturePrivateThreadsAttribute() : bool
Return values
bool

getFeatureRaidAlertsDisabledAttribute()

protected getFeatureRaidAlertsDisabledAttribute() : bool
Return values
bool

getFeatureRaidAlertsEnabledAttribute()

protected getFeatureRaidAlertsEnabledAttribute() : bool
Return values
bool

getFeatureRoleIconsAttribute()

protected getFeatureRoleIconsAttribute() : bool
Return values
bool

getFeatureRoleSubscriptionsAvailableForPurchaseAttribute()

protected getFeatureRoleSubscriptionsAvailableForPurchaseAttribute() : bool
Return values
bool

getFeatureRoleSubscriptionsEnabledAttribute()

protected getFeatureRoleSubscriptionsEnabledAttribute() : bool
Return values
bool

getFeatureSoundboardAttribute()

protected getFeatureSoundboardAttribute() : bool
Return values
bool

getFeatureTicketedEventsEnabledAttribute()

protected getFeatureTicketedEventsEnabledAttribute() : bool
Return values
bool

getFeatureVanityUrlAttribute()

protected getFeatureVanityUrlAttribute() : bool
Return values
bool

getFeatureVerifiedAttribute()

protected getFeatureVerifiedAttribute() : bool
Return values
bool

getFeatureVipRegionsAttribute()

protected getFeatureVipRegionsAttribute() : bool
Return values
bool

getFeatureWelcomeScreenEnabledAttribute()

protected getFeatureWelcomeScreenEnabledAttribute() : bool
Return values
bool

getIconHashAttribute()

Returns the guild icon hash.

protected getIconHashAttribute() : string|null
Return values
string|null

The guild icon hash or null.

getSplashHashAttribute()

Returns the guild splash hash.

protected getSplashHashAttribute() : string|null
Return values
string|null

The guild splash hash or null.

makeOptionalAttributes()

Return key-value attributes if it has been filled.

protected makeOptionalAttributes(array<string|int, mixed> $attributes) : array<string|int, mixed>

To be used with fields marked "optional?" from the API.

Parameters
$attributes : array<string|int, mixed>

Names of optional attribute

Return values
array<string|int, mixed>

checkForGetMutator()

Checks if there is a get mutator present.

private checkForGetMutator(string $key) : string|false
Parameters
$key : string

The attribute name to check.

Tags
since
10.0.0

Replaces checkForMutator($key, 'get')

Return values
string|false

Either a string if it is a method or false.

checkForSetMutator()

Checks if there is a set mutator present.

private checkForSetMutator(string $key) : string|false
Parameters
$key : string

The attribute name to check.

Tags
since
10.0.0

Replaces checkForMutator($key, 'set')

Return values
string|false

Either a string if it is a method or false.

getAttribute()

Gets an attribute on the part.

private getAttribute(string $key) : mixed
Parameters
$key : string

The key to the attribute.

Tags
throws
Exception
Return values
mixed

Either the attribute if it exists or void.

setAttribute()

Sets an attribute on the part.

private setAttribute(string $key, mixed $value) : void
Parameters
$key : string

The key to the attribute.

$value : mixed

The value of the attribute.

studly()

Converts a string to studlyCase.

private static studly(string $string) : string

This is a port of updated Laravel's implementation, a non-regex with static cache. The Discord\studly() is kept due to unintended bug and we do not want to introduce BC by replacing it. This method is private static as we may move it outside this class in future.

Parameters
$string : string

The string to convert.

Tags
since
10.0.0
Return values
string

        
On this page

Search results