Trait luya\web\jsonld\ThingTrait

Implemented byluya\web\jsonld\AggregateRating, luya\web\jsonld\Article, luya\web\jsonld\BarOrPub, luya\web\jsonld\BaseThing, luya\web\jsonld\BlogPosting, luya\web\jsonld\CafeOrCoffeeShop, luya\web\jsonld\Comment, luya\web\jsonld\ContactPoint, luya\web\jsonld\Country, luya\web\jsonld\CreativeWork, luya\web\jsonld\EntertainmentBusiness, luya\web\jsonld\Event, luya\web\jsonld\FoodEstablishment, luya\web\jsonld\GeoCoordinates, luya\web\jsonld\ImageObject, luya\web\jsonld\LiveBlogPosting, luya\web\jsonld\LocalBusiness, luya\web\jsonld\MediaObject, luya\web\jsonld\NightClub, luya\web\jsonld\Offer, luya\web\jsonld\Organization, luya\web\jsonld\Person, luya\web\jsonld\Place, luya\web\jsonld\PostalAddress, luya\web\jsonld\PropertyValue, luya\web\jsonld\Rating, luya\web\jsonld\Restaurant, luya\web\jsonld\Review, luya\web\jsonld\SocialMediaPosting, luya\web\jsonld\Thing
Available since version1.0.0
Source Code https://github.com/luyadev/luya/blob/master/core/web/jsonld/ThingTrait.php

JsonLd - Thing trait

Public Methods

Hide inherited methods

Method Description Defined By
getAdditionalType() luya\web\jsonld\ThingTrait
getAlternateName() luya\web\jsonld\ThingTrait
getDescription() luya\web\jsonld\ThingTrait
getDisambiguatingDescription() luya\web\jsonld\ThingTrait
getIdentifier() luya\web\jsonld\ThingTrait
getImage() luya\web\jsonld\ThingTrait
getMainEntityOfPage() luya\web\jsonld\ThingTrait
getName() luya\web\jsonld\ThingTrait
getOffers() Get Offer luya\web\jsonld\ThingTrait
getSameAs() luya\web\jsonld\ThingTrait
getSubjectOf() luya\web\jsonld\ThingTrait
getUrl() luya\web\jsonld\ThingTrait
setAdditionalType() An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. luya\web\jsonld\ThingTrait
setAlternateName() An alias for the item luya\web\jsonld\ThingTrait
setDescription() A description of the item. luya\web\jsonld\ThingTrait
setDisambiguatingDescription() A sub property of description. A short description of the item used to disambiguate from other, similar items. luya\web\jsonld\ThingTrait
setIdentifier() The identifier property represents any kind of identifier for any kind of Thing, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See background notes for more details. luya\web\jsonld\ThingTrait
setImage() An image of the item. luya\web\jsonld\ThingTrait
setMainEntityOfPage() Indicates a page (or other CreativeWork) for which this thing is the main entity being described. luya\web\jsonld\ThingTrait
setName() The name of the item. luya\web\jsonld\ThingTrait
setOffers() Set Offer luya\web\jsonld\ThingTrait
setSameAs() URL of a reference Web page that unambiguously indicates the item's identity. luya\web\jsonld\ThingTrait
setSubjectOf() A CreativeWork or Event about this Thing. luya\web\jsonld\ThingTrait
setUrl() URL of the item. luya\web\jsonld\ThingTrait

Method Details

Hide inherited methods

getAdditionalType() public method

public string getAdditionalType ( )

                public function getAdditionalType()
{
    return $this->_additionalType;
}

            
getAlternateName() public method

public string getAlternateName ( )

                public function getAlternateName()
{
    return $this->_alternateName;
}

            
getDescription() public method

public string getDescription ( )

                public function getDescription()
{
    return $this->_description;
}

            
getDisambiguatingDescription() public method

public string getDisambiguatingDescription ( )

                public function getDisambiguatingDescription()
{
    return $this->_disambiguatingDescription;
}

            
getIdentifier() public method

public luya\web\jsonld\PropertyValue getIdentifier ( )

                public function getIdentifier()
{
    return $this->_identifier;
}

            
getImage() public method

public luya\web\jsonld\ImageObject getImage ( )

                public function getImage()
{
    return $this->_image;
}

            
getMainEntityOfPage() public method

public luya\web\jsonld\CreativeWork getMainEntityOfPage ( )

                public function getMainEntityOfPage()
{
    return $this->_mainEntityOfPage;
}

            
getName() public method

public string getName ( )

                public function getName()
{
    return $this->_name;
}

            
getOffers() public method (available since version 1.2.2)

Get Offer

public luya\web\jsonld\Offer getOffers ( )

                public function getOffers()
{
    return $this->_offers;
}

            
getSameAs() public method

public string getSameAs ( )

                public function getSameAs()
{
    return $this->_sameAs;
}

            
getSubjectOf() public method

public luya\web\jsonld\CreativeWork|luya\web\jsonld\Event getSubjectOf ( )

                public function getSubjectOf()
{
    return $this->_subjectOf;
}

            
getUrl() public method

public string getUrl ( )

                public function getUrl()
{
    return $this->_url;
}

            
setAdditionalType() public method

An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax.

This is a relationship between something and a class that the thing is in.

public static setAdditionalType ( luya\web\jsonld\UrlValue $additionalType )
$additionalType string

                public function setAdditionalType(UrlValue $additionalType)
{
    $this->_additionalType = $additionalType->getValue();
    return $this;
}

            
setAlternateName() public method

An alias for the item

public static setAlternateName ( $alternateName )
$alternateName string

                public function setAlternateName($alternateName)
{
    $this->_alternateName = $alternateName;
    return $this;
}

            
setDescription() public method

A description of the item.

public static setDescription ( $description )
$description string

                public function setDescription($description)
{
    $this->_description = $description;
    return $this;
}

            
setDisambiguatingDescription() public method

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 static setDisambiguatingDescription ( $disambiguatingDescription )
$disambiguatingDescription string

                public function setDisambiguatingDescription($disambiguatingDescription)
{
    $this->_disambiguatingDescription = $disambiguatingDescription;
    return $this;
}

            
setIdentifier() public method

The identifier property represents any kind of identifier for any kind of Thing, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See background notes for more details.

public static setIdentifier ( luya\web\jsonld\PropertyValue $identifier )
$identifier luya\web\jsonld\PropertyValue

                public function setIdentifier(PropertyValue $identifier)
{
    $this->_identifier = $identifier;
    return $this;
}

            
setImage() public method

An image of the item.

This can be a URL or a fully described ImageObject.

public static setImage ( luya\web\jsonld\ImageObject $image )
$image luya\web\jsonld\ImageObject

                public function setImage(ImageObject $image)
{
    $this->_image = $image;
    return $this;
}

            
setMainEntityOfPage() public method

Indicates a page (or other CreativeWork) for which this thing is the main entity being described.

Inverse property: mainEntity.

public static setMainEntityOfPage ( luya\web\jsonld\CreativeWork $mainEntityOfPage )
$mainEntityOfPage luya\web\jsonld\CreativeWork

                public function setMainEntityOfPage(CreativeWork $mainEntityOfPage)
{
    $this->_mainEntityOfPage = $mainEntityOfPage;
    return $this;
}

            
setName() public method

The name of the item.

public static setName ( $name )
$name string

                public function setName($name)
{
    $this->_name = $name;
    return $this;
}

            
setOffers() public method

Set Offer

public static setOffers ( luya\web\jsonld\Offer $offers )
$offers

                public function setOffers(Offer $offers)
{
    $this->_offers = $offers;
    return $this;
}

            
setSameAs() public method

URL of a reference Web page that unambiguously indicates the item's identity.

E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website.

public static setSameAs ( luya\web\jsonld\UrlValue $sameAs )
$sameAs luya\web\jsonld\UrlValue

                public function setSameAs(UrlValue $sameAs)
{
    $this->_sameAs = $sameAs->getValue();
    return $this;
}

            
setSubjectOf() public method

A CreativeWork or Event about this Thing.

Inverse property: about.

public static setSubjectOf ( $subjectOf )
$subjectOf luya\web\jsonld\CreativeWork|luya\web\jsonld\Event

                public function setSubjectOf($subjectOf)
{
    $this->_subjectOf = $subjectOf;
    return $this;
}

            
setUrl() public method

URL of the item.

public static setUrl ( luya\web\jsonld\UrlValue $url )
$url luya\web\jsonld\UrlValue

                public function setUrl(UrlValue $url)
{
    $this->_url = $url->getValue();
    return $this;
}