ChannelSectionSnippet
extends Part
in package
This file is generated from spec/discovery.json (YouTube Data API v3, revision 20260924) by tools/generate.php. Do not edit it by hand - run `composer spec:build` instead.
Basic details about a channel section, including title, style and position.
Tags
Table of Contents
Constants
- STYLE_CHANNELSECTION_STYLE_UNSPECIFIED : mixed = 'channelsectionStyleUnspecified'
- A `style` of `channelsectionStyleUnspecified`.
- STYLE_HORIZONTAL_ROW : mixed = 'horizontalRow'
- A `style` of `horizontalRow`.
- STYLE_VERTICAL_LIST : mixed = 'verticalList'
- A `style` of `verticalList`.
- TYPE_ALL_PLAYLISTS : mixed = 'allPlaylists'
- A `type` of `allPlaylists`.
- TYPE_CHANNELSECTION_TYPE_UNDEFINED : mixed = 'channelsectionTypeUndefined'
- A `type` of `channelsectionTypeUndefined`.
- TYPE_COMPLETED_EVENTS : mixed = 'completedEvents'
- A `type` of `completedEvents`.
- TYPE_LIKED_PLAYLISTS : mixed = 'likedPlaylists'
- A `type` of `likedPlaylists`.
- TYPE_LIKES : mixed = 'likes'
- A `type` of `likes`.
- TYPE_LIVE_EVENTS : mixed = 'liveEvents'
- A `type` of `liveEvents`.
- TYPE_MULTIPLE_CHANNELS : mixed = 'multipleChannels'
- A `type` of `multipleChannels`.
- TYPE_MULTIPLE_PLAYLISTS : mixed = 'multiplePlaylists'
- A `type` of `multiplePlaylists`.
- TYPE_POPULAR_UPLOADS : mixed = 'popularUploads'
- A `type` of `popularUploads`.
- TYPE_POSTED_PLAYLISTS : mixed = 'postedPlaylists'
- A `type` of `postedPlaylists`.
- TYPE_POSTED_VIDEOS : mixed = 'postedVideos'
- A `type` of `postedVideos`.
- TYPE_RECENT_ACTIVITY : mixed = 'recentActivity'
- A `type` of `recentActivity`.
- TYPE_RECENT_POSTS : mixed = 'recentPosts'
- A `type` of `recentPosts`.
- TYPE_RECENT_UPLOADS : mixed = 'recentUploads'
- A `type` of `recentUploads`.
- TYPE_SINGLE_PLAYLIST : mixed = 'singlePlaylist'
- A `type` of `singlePlaylist`.
- TYPE_SUBSCRIPTIONS : mixed = 'subscriptions'
- A `type` of `subscriptions`.
- TYPE_UPCOMING_EVENTS : mixed = 'upcomingEvents'
- A `type` of `upcomingEvents`.
Properties
- $channelId : string|null
- $defaultLanguage : string|null
- $localized : ChannelSectionLocalization|null
- $position : int|null
- $style : string|null
- $title : string|null
- $type : string|null
- $casts : array<string, string>
- Attribute name => type token (`"LiveChatMessageSnippet"`, `"Array of Thumbnail"`, `"Map of VideoLocalization"`), used to hydrate nested objects into parts.
- $dates : array<int, string>
- Attribute names holding RFC 3339 timestamps, read back as {@see CarbonImmutable}. They are stored and serialised as the strings YouTube sent.
- $youtube : ?YouTube
Methods
- __construct() : mixed
- __debugInfo() : array<string, mixed>
- __get() : mixed
- __isset() : bool
- __set() : void
- __toString() : string
- __unset() : void
- attributeExists() : bool
- fill() : void
- getAttribute() : mixed
- getCasts() : array<string, string>
- getDates() : array<int, string>
- getRawAttribute() : mixed
- Reads straight from the attribute bag, skipping the `get{Key}Attribute` hook.
- getRawAttributes() : array<string, mixed>
- getYouTube() : YouTube
- The client this part came from.
- jsonSerialize() : array<string, mixed>
- The payload this part would be sent back to YouTube as: nested parts and collections flattened, timestamps as RFC 3339 strings.
- offsetExists() : bool
- offsetGet() : mixed
- offsetSet() : void
- offsetUnset() : void
- setAttribute() : void
- factory() : Factory
- Builds another part from the same client - for nested objects.
- setRawAttribute() : void
- Writes straight to the attribute bag, skipping the `set{Key}Attribute` hook and any cast. For use *inside* a mutator, which would otherwise have no way to store its shaped value without recursing through {@see setAttribute()}.
Constants
STYLE_CHANNELSECTION_STYLE_UNSPECIFIED
A `style` of `channelsectionStyleUnspecified`.
public
mixed
STYLE_CHANNELSECTION_STYLE_UNSPECIFIED
= 'channelsectionStyleUnspecified'
STYLE_HORIZONTAL_ROW
A `style` of `horizontalRow`.
public
mixed
STYLE_HORIZONTAL_ROW
= 'horizontalRow'
STYLE_VERTICAL_LIST
A `style` of `verticalList`.
public
mixed
STYLE_VERTICAL_LIST
= 'verticalList'
TYPE_ALL_PLAYLISTS
A `type` of `allPlaylists`.
public
mixed
TYPE_ALL_PLAYLISTS
= 'allPlaylists'
TYPE_CHANNELSECTION_TYPE_UNDEFINED
A `type` of `channelsectionTypeUndefined`.
public
mixed
TYPE_CHANNELSECTION_TYPE_UNDEFINED
= 'channelsectionTypeUndefined'
TYPE_COMPLETED_EVENTS
A `type` of `completedEvents`.
public
mixed
TYPE_COMPLETED_EVENTS
= 'completedEvents'
TYPE_LIKED_PLAYLISTS
A `type` of `likedPlaylists`.
public
mixed
TYPE_LIKED_PLAYLISTS
= 'likedPlaylists'
TYPE_LIKES
A `type` of `likes`.
public
mixed
TYPE_LIKES
= 'likes'
TYPE_LIVE_EVENTS
A `type` of `liveEvents`.
public
mixed
TYPE_LIVE_EVENTS
= 'liveEvents'
TYPE_MULTIPLE_CHANNELS
A `type` of `multipleChannels`.
public
mixed
TYPE_MULTIPLE_CHANNELS
= 'multipleChannels'
TYPE_MULTIPLE_PLAYLISTS
A `type` of `multiplePlaylists`.
public
mixed
TYPE_MULTIPLE_PLAYLISTS
= 'multiplePlaylists'
TYPE_POPULAR_UPLOADS
A `type` of `popularUploads`.
public
mixed
TYPE_POPULAR_UPLOADS
= 'popularUploads'
TYPE_POSTED_PLAYLISTS
A `type` of `postedPlaylists`.
public
mixed
TYPE_POSTED_PLAYLISTS
= 'postedPlaylists'
TYPE_POSTED_VIDEOS
A `type` of `postedVideos`.
public
mixed
TYPE_POSTED_VIDEOS
= 'postedVideos'
TYPE_RECENT_ACTIVITY
A `type` of `recentActivity`.
public
mixed
TYPE_RECENT_ACTIVITY
= 'recentActivity'
TYPE_RECENT_POSTS
A `type` of `recentPosts`.
public
mixed
TYPE_RECENT_POSTS
= 'recentPosts'
TYPE_RECENT_UPLOADS
A `type` of `recentUploads`.
public
mixed
TYPE_RECENT_UPLOADS
= 'recentUploads'
TYPE_SINGLE_PLAYLIST
A `type` of `singlePlaylist`.
public
mixed
TYPE_SINGLE_PLAYLIST
= 'singlePlaylist'
TYPE_SUBSCRIPTIONS
A `type` of `subscriptions`.
public
mixed
TYPE_SUBSCRIPTIONS
= 'subscriptions'
TYPE_UPCOMING_EVENTS
A `type` of `upcomingEvents`.
public
mixed
TYPE_UPCOMING_EVENTS
= 'upcomingEvents'
Properties
$channelId
public
string|null
$channelId
The ID that YouTube uses to uniquely identify the channel that published the channel section.
$defaultLanguage
public
string|null
$defaultLanguage
Deprecated. The language of the channel section's default title and description.
$localized
public
ChannelSectionLocalization|null
$localized
Deprecated. Localized title, read-only.
$position
public
int|null
$position
The position of the channel section in the channel.
$style
public
string|null
$style
Deprecated. The style of the channel section. One of the STYLE_* constants.
$title
public
string|null
$title
The channel section's title for multiple_playlists and multiple_channels.
$type
public
string|null
$type
The type of the channel section. One of the TYPE_* constants.
$casts
Attribute name => type token (`"LiveChatMessageSnippet"`, `"Array of Thumbnail"`, `"Map of VideoLocalization"`), used to hydrate nested objects into parts.
protected
array<string, string>
$casts
= ['localized' => 'ChannelSectionLocalization']
$dates
Attribute names holding RFC 3339 timestamps, read back as {@see CarbonImmutable}. They are stored and serialised as the strings YouTube sent.
protected
array<int, string>
$dates
= []
$youtube read-only
protected
?YouTube
$youtube
= null
Methods
__construct()
public
__construct([YouTube|null $youtube = null ][, array<string, mixed>|object $attributes = [] ]) : mixed
Parameters
- $youtube : YouTube|null = null
-
The client, for behaviour that calls the API.
- $attributes : array<string, mixed>|object = []
__debugInfo()
public
__debugInfo() : array<string, mixed>
Return values
array<string, mixed>__get()
public
__get(string $name) : mixed
Parameters
- $name : string
__isset()
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
bool__set()
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
__toString()
public
__toString() : string
Return values
string__unset()
public
__unset(string $name) : void
Parameters
- $name : string
attributeExists()
public
attributeExists(string $key) : bool
Parameters
- $key : string
Return values
boolfill()
public
fill(array<string, mixed> $attributes) : void
Parameters
- $attributes : array<string, mixed>
getAttribute()
public
getAttribute(string $key) : mixed
Parameters
- $key : string
getCasts()
public
getCasts() : array<string, string>
Return values
array<string, string>getDates()
public
getDates() : array<int, string>
Return values
array<int, string>getRawAttribute()
Reads straight from the attribute bag, skipping the `get{Key}Attribute` hook.
public
getRawAttribute(string $key) : mixed
Parameters
- $key : string
getRawAttributes()
public
getRawAttributes() : array<string, mixed>
Return values
array<string, mixed>getYouTube()
The client this part came from.
public
getYouTube() : YouTube
Tags
Return values
YouTubejsonSerialize()
The payload this part would be sent back to YouTube as: nested parts and collections flattened, timestamps as RFC 3339 strings.
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>offsetExists()
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
offsetSet()
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
setAttribute()
public
setAttribute(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
factory()
Builds another part from the same client - for nested objects.
protected
factory() : Factory
Return values
FactorysetRawAttribute()
Writes straight to the attribute bag, skipping the `set{Key}Attribute` hook and any cast. For use *inside* a mutator, which would otherwise have no way to store its shaped value without recursing through {@see setAttribute()}.
protected
setRawAttribute(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed