Oihana PHP System

VideoObject extends MediaObject

A video object file representation.

Table of Contents

Constants

CONTEXT  = 'https://schema.org'
JSON-LD @context declaration for Schema.org.

Properties

$_from  : string|null
The metadata to indicates the edge 'from' identifier.
$_id  : null|string
The metadata identifier of the item.
$_key  : null|string
The metadata unique key identifier of the thing.
$_rev  : null|string
The metadata revision value of the thing.
$_to  : string|null
The metadata to indicates the edge 'to' identifier.
$about  : string|object|null
The subject matter of the content.
$abstract  : string|null
An abstract is a short description that summarizes a CreativeWork.
$accessibilityAPI  : string|null
Indicates that the resource is compatible with the referenced accessibility API.
$accessibilityControl  : string|null
Identifies input methods that are sufficient to fully control the described resource.
$accessibilityFeature  : string|null
Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility.
$accessibilityHazard  : string|null
A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3.
$accessibilitySummary  : string|null
A human-readable summary of specific accessibility features or deficiencies, consistent with the other accessibility metadata but expressing subtleties such as "short descriptions are present but long descriptions will be needed for non-visual users" or "short descriptions are present and no long descriptions are needed".
$accessMode  : string|null
The human sensory perceptual system or cognitive faculty through which a person may process or perceive information.
$accessModeSufficient  : ItemList|null
A list of single or combined accessModes that are sufficient to understand all the intellectual content of a resource.
$accountablePerson  : array<string|int, mixed>|Person|null
Specifies the Person that is legally accountable for the CreativeWork.
$acquireLicensePage  : string|CreativeWork|null
Indicates a page documenting how licenses can be purchased or otherwise acquired, for the current item.
$active  : bool|null
The active flag.
$actor  : string|null
The actor of the item
$additionalType  : array<string|int, mixed>|string|null|object
An additionalType for the item.
$aggregateRating  : array<string|int, mixed>|AggregateRating|null
The overall rating, based on a collection of reviews or ratings, of the item.
$alternateName  : string|object|null
An alias for the item.
$alternativeHeadline  : string|object|null
The alternative headline of this content.
$archivedAt  : string|WebPage|null
Indicates a page or other link involved in archival of a CreativeWork. In the case of MediaReview, the items in a MediaReviewItem may often become inaccessible, but be archived by archival, journalistic, activist, or law enforcement organizations.
$assesses  : string|DefinedTerm|null
The item being described is intended to assess the competency or learning outcome defined by the referenced term.
$associatedArticle  : CreativeWork|null
A NewsArticle associated with the Media Object.
$associatedMedia  : array<string|int, mixed>|MediaObject|null
A media object that encodes this CreativeWork. This property is a synonym for encoding.
$audience  : null|array<string|int, mixed>|Audience
An intended audience, i.e. a group for whom something was created.
$audio  : object|null
An embedded audio object.
$audioCodec  : string|null
The audio codec
$author  : null|string|AudioObject
The author of this content.
$bitrate  : float|null
The bitrate of the item.
$bitsPerSample  : int|null
The audio bit per sample
$caption  : string|null
The caption of the item.
$channels  : string|null
The number of channel of the audio
$contentLocation  : string|Place|null
The location depicted or described in the content. For example, the location in a photograph or painting.
$contentRating  : string
Official rating of a piece of content—for example,'MPAA PG-13'.
$contentSize  : float|null
The contentSize of the item.
$contentUrl  : string|null
The contentUrl of the item.
$contributor  : string|object|null
A secondary contributor to the CreativeWork or Event.
$copyrightHolder  : string|null
The party holding the legal copyright to the CreativeWork.
$copyrightYear  : string|null
The year during which the claimed copyright for the CreativeWork was first asserted.
$created  : null|string|DateTime
Date of creation of the resource.
$dateCreated  : string|null
The date on which the CreativeWork was created or the item was added to a DataFeed.
$dateModified  : string|null
The date on which the CreativeWork was most recently modified or when the item's entry was modified within a DataFeed.
$datePublished  : string|null
Date of first broadcast/publication.
$description  : string|null
A short description of the item.
$director  : string|null
The director of the item.
$disambiguatingDescription  : string|null
A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.
$duration  : int|null
The duration of the item.
$editor  : string|null
Specifies the Person who edited the CreativeWork.
$embedUrl  : string|null
The embedUrl of the item.
$encodesCreativeWork  : CreativeWork|null
The CreativeWork encoded by this media object.
$encoding  : string|null
The encoding of this content.
$encodingFormat  : string|null
Media type typically expressed using a MIME format (see IANA site and MDN reference) e.g. application/zip for a SoftwareApplication binary, audio/mpeg for .mp3 etc.).
$endTime  : string|DateTime|int|null
The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. E.g. John wrote a book from January to December. For media, including audio and video, it's the time offset of the end of a clip within a larger file.
$expires  : string|null
Date the content expires and is no longer useful or available. For example a VideoObject or NewsArticle whose availability or relevance is time-limited, or a ClaimReview fact check whose publisher wants to indicate that it may no longer be relevant (or helpful to highlight) after some date.
$hasPart  : string|Thing|array<string|int, mixed>|null
Indicates an item that this part of this item.
$headline  : string|object|null
The headline of this content.
$height  : float|null
The height of the item.
$id  : null|int|string
The unique identifier of the item.
$identifier  : string|null
The identifier of the item.
$image  : string|object|null
The image reference of this resource.
$ineligibleRegion  : GeoShape|Place|string|null
The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, r the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed.
$inLanguage  : array<string|int, mixed>|string|null
The language of the content or performance or used in an action.
$interactionStatistic  : InteractionCounter|array<string|int, mixed>|null
The number of interactions for the CreativeWork using the WebSite or SoftwareApplication.
$interpretedAsClaim  : Claim|null
Used to indicate a specific claim contained, implied, translated or refined from the content of a MediaObject or other CreativeWork. The interpreting party can be indicated using claimInterpreter.
$isAccessibleForFree  : bool|null
A flag to signal that the item, event, or place is accessible for free.
$isBasedOn  : array<string|int, mixed>|object|null
A resource that was used in the creation of this resource. This term can be repeated for multiple sources.
$isPartOf  : string|Thing|array<string|int, mixed>|null
Indicates an item that this item is part of.
$keywords  : string|DefinedTerm|array<string|int, mixed>|null
Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.
$license  : string|object|null
A legal document giving official permission to do something with the resource.
$locationCreated  : string|object|null
The location where the CreativeWork was created, which may not be the same as the location depicted in the CreativeWork.
$mainEntity  : string|object|null
Indicates the primary entity described in some page or other CreativeWork.
$material  : array<string|int, mixed>|Product|string|null
A material that something is made from, e.g. leather, wool, cotton, paper.
$mentions  : array<string|int, mixed>|string|null
The mentions of this content.
$modified  : null|string|DateTime
Date on which the resource was changed.
$musicBy  : string|null
The music by of the item
$name  : int|string|null
The name of the item.
$offers  : array<string|int, mixed>|Offer|null|Demand
An offer to provide this item.
$playerType  : string|null
The playerType of the item.
$position  : int|null
The position of an item in a series or sequence of items.
$primary  : bool|null
When multiple image appear in an entry, indicates which is primary. At most one image may be primary. Default value is false.
$producer  : object|null
The person or organization who produced the work.
$productionCompany  : array<string|int, mixed>|Organization|null
The production company or studio responsible for the item, e.g. series, video game, episode etc.
$provider  : string|object|null
The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
$publisher  : string|array<string|int, mixed>|Person|Organization|null
The publisher of the resource.
$recordedAt  : object|null
The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event.
$regionsAllowed  : array<string|int, mixed>|Place|string|null
The regions where the media is allowed.
$releaseEvent  : object|null
The place and time the release was issued, expressed as a PublicationEvent.
$requiresSubscription  : bool|MediaSubscription|null
Indicates if use of the media require a subscription (either paid or free).
$review  : array<string|int, mixed>|Review|null
A review of the item.
$sampleRate  : int|null
The sample rate of the audio
$sha256  : string|null
The SHA-2 SHA256 hash of the content of the item. For example, a zero-length input has value 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'.
$sourceOrganization  : object|null
The Organization on whose behalf the creator was working.
$sponsor  : array<string|int, mixed>|object|string|null
A person or organization that supports a thing through a pledge, promise, or financial contribution. e.g. a sponsor of a Medical Study or a corporate sponsor of an event.
$startTime  : string|DateTime|int|null
The startTime of something.
$temporal  : string|object|null
The "temporal" property can be used in cases where more specific properties (e.g. temporalCoverage, dateCreated, dateModified, datePublished) are not known to be appropriate.
$temporalCoverage  : string|object|null
The temporalCoverage of a CreativeWork indicates the period that the content applies to, i.e. that it describes, either as a DateTime or as a textual string indicating a time period in ISO 8601 time interval format. In the case of a Dataset it will typically indicate the relevant time period in a precise notation (e.g. for a 2011 census dataset, the year 2011 would be written "2011/2012"). Other forms of content e.g. ScholarlyArticle, Book, TVSeries or TVEpisode may indicate their temporalCoverage in broader terms - textually or via well-known URL. Written works such as books may sometimes have precise temporal coverage too, e.g. a work set in 1939 - 1945 can be indicated in ISO 8601 interval format format via "1939/1945".
$text  : string|object|null
The text of the creative work.
$thumbnail  : string|object|null
The thumbnail of the item.
$thumbnailUrl  : string|object|null
A thumbnail image relevant to the Thing.
$timeRequired  : string|null
Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'PT30M', 'PT1H25M'.
$transcript  : string|null
The transcript of the item
$translator  : string|object|null
Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market, or that translates during some event.
$typicalAgeRange  : string|object|null
The typical expected age range, e.g. '7-9', '11-'.
$uploadDate  : string|DateTime|null|int
Date (including time if available) when this media object was uploaded to this site.
$url  : int|string|null
URL of the item.
$usageInfo  : string|CreativeWork|null
The schema.org usageInfo property indicates further information about a CreativeWork.
$version  : null|string|int
The version of the CreativeWork embodied by a specified resource.
$video  : string|object|null
An embedded video object.
$videoFrameSize  : string|null
The video frame size of the item
$videoQuality  : string|null
The video quality of the item
$width  : float|null
The width of the item.

Methods

__construct()  : mixed
Constructor to hydrate public properties from an array or stdClass.
jsonSerialize()  : array<string|int, mixed>
Serializes the current object into a JSON-LD array.

Constants

CONTEXT

JSON-LD @context declaration for Schema.org.

public mixed CONTEXT = 'https://schema.org'

Properties

$_from

The metadata to indicates the edge 'from' identifier.

public string|null $_from

$_id

The metadata identifier of the item.

public null|string $_id

$_key

The metadata unique key identifier of the thing.

public null|string $_key

$_rev

The metadata revision value of the thing.

public null|string $_rev

$_to

The metadata to indicates the edge 'to' identifier.

public string|null $_to

$abstract

An abstract is a short description that summarizes a CreativeWork.

public string|null $abstract

$accessibilityAPI

Indicates that the resource is compatible with the referenced accessibility API.

public string|null $accessibilityAPI

$accessibilityControl

Identifies input methods that are sufficient to fully control the described resource.

public string|null $accessibilityControl

$accessibilityFeature

Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility.

public string|null $accessibilityFeature

$accessibilityHazard

A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3.

public string|null $accessibilityHazard

$accessibilitySummary

A human-readable summary of specific accessibility features or deficiencies, consistent with the other accessibility metadata but expressing subtleties such as "short descriptions are present but long descriptions will be needed for non-visual users" or "short descriptions are present and no long descriptions are needed".

public string|null $accessibilitySummary

$accessMode

The human sensory perceptual system or cognitive faculty through which a person may process or perceive information.

public string|null $accessMode

$accessModeSufficient

A list of single or combined accessModes that are sufficient to understand all the intellectual content of a resource.

public ItemList|null $accessModeSufficient

$accountablePerson

Specifies the Person that is legally accountable for the CreativeWork.

public array<string|int, mixed>|Person|null $accountablePerson

$acquireLicensePage

Indicates a page documenting how licenses can be purchased or otherwise acquired, for the current item.

public string|CreativeWork|null $acquireLicensePage

$active

The active flag.

public bool|null $active

$actor

The actor of the item

public string|null $actor

$additionalType

An additionalType for the item.

public array<string|int, mixed>|string|null|object $additionalType

$aggregateRating

The overall rating, based on a collection of reviews or ratings, of the item.

public array<string|int, mixed>|AggregateRating|null $aggregateRating

$alternateName

An alias for the item.

public string|object|null $alternateName

$alternativeHeadline

The alternative headline of this content.

public string|object|null $alternativeHeadline

$archivedAt

Indicates a page or other link involved in archival of a CreativeWork. In the case of MediaReview, the items in a MediaReviewItem may often become inaccessible, but be archived by archival, journalistic, activist, or law enforcement organizations.

public string|WebPage|null $archivedAt

In such cases, the referenced page may not directly publish the content.

$assesses

The item being described is intended to assess the competency or learning outcome defined by the referenced term.

public string|DefinedTerm|null $assesses

$associatedMedia

A media object that encodes this CreativeWork. This property is a synonym for encoding.

public array<string|int, mixed>|MediaObject|null $associatedMedia

$audience

An intended audience, i.e. a group for whom something was created.

public null|array<string|int, mixed>|Audience $audience

$audioCodec

The audio codec

public string|null $audioCodec

$bitrate

The bitrate of the item.

public float|null $bitrate

$bitsPerSample

The audio bit per sample

public int|null $bitsPerSample

$caption

The caption of the item.

public string|null $caption

$channels

The number of channel of the audio

public string|null $channels

$contentLocation

The location depicted or described in the content. For example, the location in a photograph or painting.

public string|Place|null $contentLocation

$contentRating

Official rating of a piece of content—for example,'MPAA PG-13'.

public string $contentRating

$contentSize

The contentSize of the item.

public float|null $contentSize

$contentUrl

The contentUrl of the item.

public string|null $contentUrl

$contributor

A secondary contributor to the CreativeWork or Event.

public string|object|null $contributor

$copyrightHolder

The party holding the legal copyright to the CreativeWork.

public string|null $copyrightHolder

$copyrightYear

The year during which the claimed copyright for the CreativeWork was first asserted.

public string|null $copyrightYear

$created

Date of creation of the resource.

public null|string|DateTime $created

$dateCreated

The date on which the CreativeWork was created or the item was added to a DataFeed.

public string|null $dateCreated

$dateModified

The date on which the CreativeWork was most recently modified or when the item's entry was modified within a DataFeed.

public string|null $dateModified

$datePublished

Date of first broadcast/publication.

public string|null $datePublished

$description

A short description of the item.

public string|null $description

$director

The director of the item.

public string|null $director

$disambiguatingDescription

A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.

public string|null $disambiguatingDescription

$duration

The duration of the item.

public int|null $duration

$editor

Specifies the Person who edited the CreativeWork.

public string|null $editor

$embedUrl

The embedUrl of the item.

public string|null $embedUrl

$encodesCreativeWork

The CreativeWork encoded by this media object.

public CreativeWork|null $encodesCreativeWork

$encodingFormat

Media type typically expressed using a MIME format (see IANA site and MDN reference) e.g. application/zip for a SoftwareApplication binary, audio/mpeg for .mp3 etc.).

public string|null $encodingFormat

$endTime

The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. E.g. John wrote a book from January to December. For media, including audio and video, it's the time offset of the end of a clip within a larger file.

public string|DateTime|int|null $endTime

Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.

$expires

Date the content expires and is no longer useful or available. For example a VideoObject or NewsArticle whose availability or relevance is time-limited, or a ClaimReview fact check whose publisher wants to indicate that it may no longer be relevant (or helpful to highlight) after some date.

public string|null $expires

$hasPart

Indicates an item that this part of this item.

public string|Thing|array<string|int, mixed>|null $hasPart

$headline

The headline of this content.

public string|object|null $headline

$height

The height of the item.

public float|null $height

$id

The unique identifier of the item.

public null|int|string $id

$identifier

The identifier of the item.

public string|null $identifier

$image

The image reference of this resource.

public string|object|null $image

$ineligibleRegion

The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, r the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed.

public GeoShape|Place|string|null $ineligibleRegion

$inLanguage

The language of the content or performance or used in an action.

public array<string|int, mixed>|string|null $inLanguage

$interactionStatistic

The number of interactions for the CreativeWork using the WebSite or SoftwareApplication.

public InteractionCounter|array<string|int, mixed>|null $interactionStatistic

The most specific child type of InteractionCounter should be used.

$interpretedAsClaim

Used to indicate a specific claim contained, implied, translated or refined from the content of a MediaObject or other CreativeWork. The interpreting party can be indicated using claimInterpreter.

public Claim|null $interpretedAsClaim

$isAccessibleForFree

A flag to signal that the item, event, or place is accessible for free.

public bool|null $isAccessibleForFree

$isBasedOn

A resource that was used in the creation of this resource. This term can be repeated for multiple sources.

public array<string|int, mixed>|object|null $isBasedOn

$isPartOf

Indicates an item that this item is part of.

public string|Thing|array<string|int, mixed>|null $isPartOf

$keywords

Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.

public string|DefinedTerm|array<string|int, mixed>|null $keywords

$license

A legal document giving official permission to do something with the resource.

public string|object|null $license

$locationCreated

The location where the CreativeWork was created, which may not be the same as the location depicted in the CreativeWork.

public string|object|null $locationCreated

$mainEntity

Indicates the primary entity described in some page or other CreativeWork.

public string|object|null $mainEntity

$material

A material that something is made from, e.g. leather, wool, cotton, paper.

public array<string|int, mixed>|Product|string|null $material

$mentions

The mentions of this content.

public array<string|int, mixed>|string|null $mentions

$modified

Date on which the resource was changed.

public null|string|DateTime $modified

$musicBy

The music by of the item

public string|null $musicBy

$name

The name of the item.

public int|string|null $name

$playerType

The playerType of the item.

public string|null $playerType

$position

The position of an item in a series or sequence of items.

public int|null $position

$primary

When multiple image appear in an entry, indicates which is primary. At most one image may be primary. Default value is false.

public bool|null $primary

$producer

The person or organization who produced the work.

public object|null $producer

$productionCompany

The production company or studio responsible for the item, e.g. series, video game, episode etc.

public array<string|int, mixed>|Organization|null $productionCompany

$provider

The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.

public string|object|null $provider

$recordedAt

The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event.

public object|null $recordedAt

$regionsAllowed

The regions where the media is allowed.

public array<string|int, mixed>|Place|string|null $regionsAllowed

If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format.

$releaseEvent

The place and time the release was issued, expressed as a PublicationEvent.

public object|null $releaseEvent

$requiresSubscription

Indicates if use of the media require a subscription (either paid or free).

public bool|MediaSubscription|null $requiresSubscription

Allowed values are true or false (note that an earlier version had 'yes', 'no').

$sampleRate

The sample rate of the audio

public int|null $sampleRate

$sha256

The SHA-2 SHA256 hash of the content of the item. For example, a zero-length input has value 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'.

public string|null $sha256

$sourceOrganization

The Organization on whose behalf the creator was working.

public object|null $sourceOrganization

$sponsor

A person or organization that supports a thing through a pledge, promise, or financial contribution. e.g. a sponsor of a Medical Study or a corporate sponsor of an event.

public array<string|int, mixed>|object|string|null $sponsor

$startTime

The startTime of something.

public string|DateTime|int|null $startTime

For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. E.g. John wrote a book from January to December. For media, including audio and video, it's the time offset of the start of a clip within a larger file. Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.

$temporal

The "temporal" property can be used in cases where more specific properties (e.g. temporalCoverage, dateCreated, dateModified, datePublished) are not known to be appropriate.

public string|object|null $temporal

$temporalCoverage

The temporalCoverage of a CreativeWork indicates the period that the content applies to, i.e. that it describes, either as a DateTime or as a textual string indicating a time period in ISO 8601 time interval format. In the case of a Dataset it will typically indicate the relevant time period in a precise notation (e.g. for a 2011 census dataset, the year 2011 would be written "2011/2012"). Other forms of content e.g. ScholarlyArticle, Book, TVSeries or TVEpisode may indicate their temporalCoverage in broader terms - textually or via well-known URL. Written works such as books may sometimes have precise temporal coverage too, e.g. a work set in 1939 - 1945 can be indicated in ISO 8601 interval format format via "1939/1945".

public string|object|null $temporalCoverage

Open-ended date ranges can be written with ".." in place of the end date. For example, "2015-11/.." indicates a range beginning in November 2015 and with no specified final date. This is tentative and might be updated in future when ISO 8601 is officially updated. Supersedes datasetTimeInterval.

$thumbnail

The thumbnail of the item.

public string|object|null $thumbnail

$thumbnailUrl

A thumbnail image relevant to the Thing.

public string|object|null $thumbnailUrl

$timeRequired

Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'PT30M', 'PT1H25M'.

public string|null $timeRequired

$transcript

The transcript of the item

public string|null $transcript

$translator

Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market, or that translates during some event.

public string|object|null $translator

$typicalAgeRange

The typical expected age range, e.g. '7-9', '11-'.

public string|object|null $typicalAgeRange

$uploadDate

Date (including time if available) when this media object was uploaded to this site.

public string|DateTime|null|int $uploadDate

$url

URL of the item.

public int|string|null $url

$usageInfo

The schema.org usageInfo property indicates further information about a CreativeWork.

public string|CreativeWork|null $usageInfo

This property is applicable both to works that are freely available and to those that require payment or other transactions. It can reference additional information, e.g. community expectations on preferred linking and citation conventions, as well as purchasing details. For something that can be commercially licensed, usageInfo can provide detailed, resource-specific information about licensing options. This property can be used alongside the license property which indicates license(s) applicable to some piece of content. The usageInfo property can provide information about other licensing options, e.g. acquiring commercial usage rights for an image that is also available under non-commercial creative commons licenses.

$version

The version of the CreativeWork embodied by a specified resource.

public null|string|int $version

$videoFrameSize

The video frame size of the item

public string|null $videoFrameSize

$videoQuality

The video quality of the item

public string|null $videoQuality

$width

The width of the item.

public float|null $width

Methods

__construct()

Constructor to hydrate public properties from an array or stdClass.

public __construct([array<string|int, mixed>|object|null $init = null ]) : mixed

This allows objects to be quickly populated with associative data without manually setting each property.

Parameters
$init : array<string|int, mixed>|object|null = null

A data array or object used to initialize the instance. Keys must match public property names.

Tags
example
use org\schema\Person;
use org\schema\constants\Prop;

$person = new Person
([
    Prop::NAME => 'Jane Doe',
    Prop::URL  => 'https://example.com/janedoe'
]);

echo $person->name; // Outputs: Jane Doe

jsonSerialize()

Serializes the current object into a JSON-LD array.

public jsonSerialize() : array<string|int, mixed>

This method will include all public properties, the schema.org @context, and the inferred @type based on the class name.

Null values will be automatically removed using compress().

Tags
throws
ReflectionException

If reflection fails when accessing properties.

example
use org\schema\Person;
use org\schema\constants\Prop;

$person = new Person([
    Prop::NAME => 'John Smith',
    Prop::ID   => 'jsmith-001'
]);

echo json_encode($person, JSON_PRETTY_PRINT);

Output:

{
  "@type": "Person",
  "@context": "https://schema.org",
  "id": "jsmith-001",
  "name": "John Smith"
}
Return values
array<string|int, mixed>

A JSON-LD array representation of the object.


        
On this page

Search results