Oihana PHP System

Person extends Thing

A person (alive, dead, undead, or fictional).

Table of Contents

Constants

CONTEXT  = 'https://schema.org'
JSON-LD @context declaration for Schema.org.
JSON_PRIORITY_KEYS  = [\org\schema\constants\Schema::AT_TYPE, \org\schema\constants\Schema::AT_CONTEXT, \org\schema\constants\Schema::_KEY, \org\schema\constants\Schema::_FROM, \org\schema\constants\Schema::_TO, \org\schema\constants\Schema::ID, \org\schema\constants\Schema::NAME, \org\schema\constants\Schema::URL, \org\schema\constants\Schema::CREATED, \org\schema\constants\Schema::MODIFIED]
Defines the priority order of keys when serializing the object to JSON-LD.

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.
$active  : bool|null
The active flag.
$additionalName  : array<string|int, mixed>|string|null
An additional name for a Person, can be used for a middle name.
$additionalType  : array<string|int, mixed>|string|null|object
An additionalType for the item.
$address  : PostalAddress|string|array<string|int, mixed>|null
Physical address of the item (PostalAddress or any object to describe it).
$affiliation  : null|array<string|int, mixed>|Organization|string
An organization that this person is affiliated with. For example, a school/university, a club, or a team.
$agentInteractionStatistic  : InteractionCounter|array<string|int, mixed>|null
The number of completed interactions for this entity, in a particular role (the 'agent'), in a particular action (indicated in the statistic), and in a particular context (i.e. interactionService).
$alternateName  : string|object|array<string|int, mixed>|null
An alias for the item.
$alumniOf  : null|array<string|int, mixed>|Organization|EducationalOrganization
An organization that the person is an alumni of.
$award  : null|array<string|int, mixed>|string
An award won by or for this item.
$birthDate  : string|null
The Date of birth.
$birthPlace  : Place|string|null
The place where the person was born.
$brand  : null|Brand|Organization
The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.
$callSign  : string|null
A callsign, as used in broadcasting and radio communications to identify people, radio and TV stations, or vehicles.
$children  : array<string|int, mixed>|Person|null
The children of the person.
$colleague  : array<string|int, mixed>|Person|null
The colleague of the person.
$contactPoint  : array<string|int, mixed>|ContactPoint|null|string
A contact point for a person or organization.
$created  : null|string
Date of creation of the resource.
$deathDate  : string|null
The Date of death.
$deathPlace  : Place|string|null
The place where the person died.
$description  : string|object|array<string|int, mixed>|null
A short description 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.
$duns  : string|null
The Dun & Bradstreet DUNS number for identifying an organization or business person.
$email  : string|null
The email of the user.
$familyName  : string|null
The family name of the user.
$faxNumber  : string|null|array<string|int, mixed>|PropertyValue
The fax number.
$follows  : array<string|int, mixed>|Person|null
The most generic uni-directional social relation.
$funder  : null|string|array<string|int, mixed>|Person|Organization
A person or organization that supports (sponsors) something through some kind of financial contribution.
$funding  : string|array<string|int, mixed>|Grant|null
A Grant that directly or indirectly provide funding or sponsorship for this item.
$gender  : Enumeration|DefinedTerm|string|null
The gender of the user.
$givenName  : string|null
The given name of the user (first name).
$globalLocationNumber  : string|null
The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place.
$hasCertification  : array<string|int, mixed>|Certification|null
Certification information about a product, organization, service, place, or person.
$hasCredential  : string|array<string|int, mixed>|EducationalOccupationalCredential|null
A credential awarded to the Person or Organization.
$hasOccupation  : array<string|int, mixed>|string|Occupation|null
The Person's occupation. For past professions, use Role for expressing dates.
$hasOfferCatalog  : array<string|int, mixed>|OfferCatalog|null
Indicates an OfferCatalog listing for this Organization, Person, or Service.
$hasPart  : string|Thing|array<string|int, Thing>|null
Indicates an item that this part of this item.
$hasPOS  : array<string|int, mixed>|Place|null
Points-of-Sales operated by the organization or person.
$height  : Distance|QuantitativeValue|null|int|float
The height of the item.
$homeLocation  : null|string|array<string|int, mixed>|ContactPoint|Place
A contact location for a person's residence.
$honorificPrefix  : string|null
An honorific prefix preceding a Person's name such as Dr/Mrs/Mr.
$honorificSuffix  : string|null
An honorific suffix following a Person's name such as M.D./PhD/MSCSW.
$id  : null|int|string
The unique identifier of the item.
$identifier  : string|null
The identifier of the item.
$image  : string|ImageObject|array<string|int, ImageObject|string>|null
The image reference of this resource.
$interactionStatistic  : InteractionCounter|array<string|int, mixed>|null
The number of interactions for the CreativeWork using the WebSite or SoftwareApplication.
$isicV4  : string|null
The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place.
$isPartOf  : string|Thing|array<string|int, Thing>|null
Indicates an item that this item is part of.
$jobTitle  : array<string|int, mixed>|string|DefinedTerm|null
The job(s) title(s) of the person (for example, Painter, etc.).
$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.
$knows  : array<string|int, mixed>|Person|null
The most generic bi-directional social/work relation.
$knowsAbout  : string|Thing|null
Of a Person, and less typically of an Organization, to indicate a topic that is known about - suggesting possible expertise but not implying it. We do not distinguish skill levels here, or relate this to educational content, events, objectives or JobPosting descriptions.
$knowsLanguage  : string|array<string|int, mixed>|Language|null
The most generic bi-directional social/work relation.
$license  : string|object|null
A legal document giving official permission to do something with the resource.
$logo  : null|string|ImageObject
The location of the organization
$mainEntityOfPage  : string|null
Indicates a page (or other CreativeWork) for which this thing is the main entity being described.
$makesOffer  : array<string|int, mixed>|Offer|null
A pointer to products or services offered by the organization or person.
$memberOf  : array<string|int, mixed>|object|null
An Organization to which this Person or Organization belongs.
$modified  : null|string
Date on which the resource was changed.
$naics  : string|null
The North American Industry Classification System (NAICS) code for a particular organization or business person.
$name  : int|string|null
The name of the item.
$nationality  : null|string|Country
Nationality of the person.
$netWorth  : PriceSpecification|MonetaryAmount|null
The total financial value of the person as calculated by subtracting the total value of liabilities from the total value of assets.
$owner  : null|string|Thing
The owner of this Thing.
$owns  : array<string|int, mixed>|Product|OwnershipInfo|null
Products owned by the organization or person.
$parent  : array<string|int, mixed>|Person|null|string
A parent of this person.
$performerIn  : array<string|int, mixed>|Event|null
Event that this person is a performer or participant in.
$photos  : array<string|int, mixed>|null
Photographs of this person (legacy spelling; see singular form, photo).
$potentialAction  : array<string|int, mixed>|Action|null
Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role.
$pronouns  : array<string|int, mixed>|DefinedTerm|StructuredValue|string|null
A short string listing or describing pronouns for a person.
$publisher  : string|array<string|int, string|Person|Organization>|Person|Organization|null
The publisher of the resource.
$publishingPrinciples  : array<string|int, mixed>|CreativeWork|string|null
The publishingPrinciples property indicates (typically via URL) a document describing the editorial principles of an Organization (or individual, e.g. a Person writing a blog) that relate to their activities as a publisher, e.g. ethics or diversity policies. When applied to a CreativeWork (e.g. NewsArticle) the principles are those of the party primarily responsible for the creation of the CreativeWork.
$relatedTo  : array<string|int, mixed>|Person|null
The most generic familial relation.
$sameAs  : string|array<string|int, mixed>|null
URL of a reference Web page that unambiguously indicates the item's identity.
$seeks  : array<string|int, mixed>|Demand|null
A pointer to products or services sought by the organization or person (demand).
$sibling  : array<string|int, mixed>|Person|null
A sibling of the person.
$skills  : array<string|int, mixed>|DefinedTerm|string|null
A statement of knowledge, skill, ability, task or any other assertion expressing a competency that is either claimed by a person, an organization or desired or required to fulfill a role or to work in an occupation.
$sponsor  : null|array<string|int, mixed>|Organization|Person
A person or organization that supports a thing through a pledge, promise, or financial contribution.
$spouse  : array<string|int, mixed>|Person|null
The person's spouse.
$subjectOf  : null|string|array<string|int, mixed>|CreativeWork|Event
A CreativeWork or Event about this Thing.
$taxID  : string|null
The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US, the SIRET/SIREN in France or the CIF/NIF in Spain.
$telephone  : string|null|array<string|int, mixed>|PropertyValue
The telephone number.
$url  : int|string|null
URL of the item.
$vatID  : string|null
The Value-added Tax ID of the organization or person.
$weight  : null|QuantitativeValue|Mass|int|float
The weight of the product or person.
$workLocation  : null|string|array<string|int, mixed>|ContactPoint|Place
A contact location for a person's place of work.
$worksFor  : null|string|array<string|int, mixed>|Organization
Organizations that the person works for.
$atContext  : string|null
The JSON-LD `@context` value.
$atType  : string|null
The JSON-LD `@type` value.

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.
withAtContext()  : $this
Sets the internal JSON-LD `@context` attribute.
withAtType()  : $this
Sets the internal JSON-LD `@type` attribute.
withJSONLDMeta()  : $this
Initializes both JSON-LD metadata: `@type` and `@context`.

Constants

CONTEXT

JSON-LD @context declaration for Schema.org.

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

JSON_PRIORITY_KEYS

Defines the priority order of keys when serializing the object to JSON-LD.

public array<string|int, string> JSON_PRIORITY_KEYS = [\org\schema\constants\Schema::AT_TYPE, \org\schema\constants\Schema::AT_CONTEXT, \org\schema\constants\Schema::_KEY, \org\schema\constants\Schema::_FROM, \org\schema\constants\Schema::_TO, \org\schema\constants\Schema::ID, \org\schema\constants\Schema::NAME, \org\schema\constants\Schema::URL, \org\schema\constants\Schema::CREATED, \org\schema\constants\Schema::MODIFIED]

Keys listed here will always appear first in the serialized array, in the order specified. All remaining public properties will be sorted alphabetically after these priority keys.

This ensures that important JSON-LD metadata and system fields (like @type, @context, _key, id, url, created, modified, etc.) appear at the top of the output for consistency and readability.

Usage:

$orderedKeys = self::JSON_PRIORITY_KEYS;

Notes:

  • Can be overridden in a subclass by redefining the constant.
  • Late static binding (static::JSON_PRIORITY_KEYS) allows child classes to modify the serialization order.

List of JSON-LD keys in priority order.

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

$active

The active flag.

public bool|null $active

$additionalName

An additional name for a Person, can be used for a middle name.

public array<string|int, mixed>|string|null $additionalName = null

$additionalType

An additionalType for the item.

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

$address

Physical address of the item (PostalAddress or any object to describe it).

public PostalAddress|string|array<string|int, mixed>|null $address = null

$affiliation

An organization that this person is affiliated with. For example, a school/university, a club, or a team.

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

$agentInteractionStatistic

The number of completed interactions for this entity, in a particular role (the 'agent'), in a particular action (indicated in the statistic), and in a particular context (i.e. interactionService).

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

$alternateName

An alias for the item.

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

$award

An award won by or for this item.

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

$birthDate

The Date of birth.

public string|null $birthDate

$birthPlace

The place where the person was born.

public Place|string|null $birthPlace

$brand

The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.

public null|Brand|Organization $brand

$callSign

A callsign, as used in broadcasting and radio communications to identify people, radio and TV stations, or vehicles.

public string|null $callSign

$children

The children of the person.

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

$colleague

The colleague of the person.

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

$contactPoint

A contact point for a person or organization.

public array<string|int, mixed>|ContactPoint|null|string $contactPoint

$created

Date of creation of the resource.

public null|string $created

$deathDate

The Date of death.

public string|null $deathDate

$deathPlace

The place where the person died.

public Place|string|null $deathPlace

$description

A short description of the item.

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

$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

$duns

The Dun & Bradstreet DUNS number for identifying an organization or business person.

public string|null $duns

$email

The email of the user.

public string|null $email

$familyName

The family name of the user.

public string|null $familyName

$follows

The most generic uni-directional social relation.

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

$funder

A person or organization that supports (sponsors) something through some kind of financial contribution.

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

$funding

A Grant that directly or indirectly provide funding or sponsorship for this item.

public string|array<string|int, mixed>|Grant|null $funding

$givenName

The given name of the user (first name).

public string|null $givenName

$globalLocationNumber

The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place.

public string|null $globalLocationNumber

The GLN is a 13-digit number used to identify parties and physical locations.

$hasCertification

Certification information about a product, organization, service, place, or person.

public array<string|int, mixed>|Certification|null $hasCertification

$hasOccupation

The Person's occupation. For past professions, use Role for expressing dates.

public array<string|int, mixed>|string|Occupation|null $hasOccupation

$hasOfferCatalog

Indicates an OfferCatalog listing for this Organization, Person, or Service.

public array<string|int, mixed>|OfferCatalog|null $hasOfferCatalog

$hasPart

Indicates an item that this part of this item.

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

$hasPOS

Points-of-Sales operated by the organization or person.

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

$homeLocation

A contact location for a person's residence.

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

$honorificPrefix

An honorific prefix preceding a Person's name such as Dr/Mrs/Mr.

public string|null $honorificPrefix

$honorificSuffix

An honorific suffix following a Person's name such as M.D./PhD/MSCSW.

public string|null $honorificSuffix

$id

The unique identifier of the item.

public null|int|string $id

$identifier

The identifier of the item.

public string|null $identifier

$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.

$isicV4

The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place.

public string|null $isicV4

$isPartOf

Indicates an item that this item is part of.

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

$jobTitle

The job(s) title(s) of the person (for example, Painter, etc.).

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

$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

$knows

The most generic bi-directional social/work relation.

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

$knowsAbout

Of a Person, and less typically of an Organization, to indicate a topic that is known about - suggesting possible expertise but not implying it. We do not distinguish skill levels here, or relate this to educational content, events, objectives or JobPosting descriptions.

public string|Thing|null $knowsAbout

$knowsLanguage

The most generic bi-directional social/work relation.

public string|array<string|int, mixed>|Language|null $knowsLanguage

$license

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

public string|object|null $license

$mainEntityOfPage

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

public string|null $mainEntityOfPage

$makesOffer

A pointer to products or services offered by the organization or person.

public array<string|int, mixed>|Offer|null $makesOffer

Inverse property: offeredBy

$memberOf

An Organization to which this Person or Organization belongs.

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

$modified

Date on which the resource was changed.

public null|string $modified

$naics

The North American Industry Classification System (NAICS) code for a particular organization or business person.

public string|null $naics

$name

The name of the item.

public int|string|null $name

$nationality

Nationality of the person.

public null|string|Country $nationality

$netWorth

The total financial value of the person as calculated by subtracting the total value of liabilities from the total value of assets.

public PriceSpecification|MonetaryAmount|null $netWorth

$owner

The owner of this Thing.

public null|string|Thing $owner

Represents any entity (person, organization, system, or other object) that can be considered the possessor of this Thing.

$parent

A parent of this person.

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

$performerIn

Event that this person is a performer or participant in.

public array<string|int, mixed>|Event|null $performerIn

$photos

Photographs of this person (legacy spelling; see singular form, photo).

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

$potentialAction

Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role.

public array<string|int, mixed>|Action|null $potentialAction

$pronouns

A short string listing or describing pronouns for a person.

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

Typically the person concerned is the best authority as pronouns are a critical part of personal identity and expression.

Publishers and consumers of this information are reminded to treat this data responsibly, take country-specific laws related to gender expression into account, and be wary of out-of-date data and drawing unwarranted inferences about the person being described.

In English, formulations such as "they/them", "she/her", and "he/him" are commonly used online and can also be used here.

We do not intend to enumerate all possible micro-syntaxes in all languages.

More structured and well-defined external values for pronouns can be referenced using the StructuredValue or DefinedTerm values.

$publishingPrinciples

The publishingPrinciples property indicates (typically via URL) a document describing the editorial principles of an Organization (or individual, e.g. a Person writing a blog) that relate to their activities as a publisher, e.g. ethics or diversity policies. When applied to a CreativeWork (e.g. NewsArticle) the principles are those of the party primarily responsible for the creation of the CreativeWork.

public array<string|int, mixed>|CreativeWork|string|null $publishingPrinciples

$relatedTo

The most generic familial relation.

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

$sameAs

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

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

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

$seeks

A pointer to products or services sought by the organization or person (demand).

public array<string|int, mixed>|Demand|null $seeks

$sibling

A sibling of the person.

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

$skills

A statement of knowledge, skill, ability, task or any other assertion expressing a competency that is either claimed by a person, an organization or desired or required to fulfill a role or to work in an occupation.

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

$sponsor

A person or organization that supports a thing through a pledge, promise, or financial contribution.

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

$spouse

The person's spouse.

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

$subjectOf

A CreativeWork or Event about this Thing.

public null|string|array<string|int, mixed>|CreativeWork|Event $subjectOf

$taxID

The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US, the SIRET/SIREN in France or the CIF/NIF in Spain.

public string|null $taxID

$telephone

The telephone number.

public string|null|array<string|int, mixed>|PropertyValue $telephone

$url

URL of the item.

public int|string|null $url

$vatID

The Value-added Tax ID of the organization or person.

public string|null $vatID

$workLocation

A contact location for a person's place of work.

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

$worksFor

Organizations that the person works for.

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

$atContext

The JSON-LD `@context` value.

private string|null $atContext = null

Default is https://schema.org.

$atType

The JSON-LD `@type` value.

private string|null $atType = null

This can be manually set or automatically inferred from the class name.

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
throws
ReflectionException
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>

Includes public properties, the JSON-LD @context and @type. Null values are automatically removed.

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>

JSON-LD representation of the object.

withAtContext()

Sets the internal JSON-LD `@context` attribute.

public withAtContext(string $context) : $this

Useful if you need a custom JSON-LD context.

Parameters
$context : string

Optional JSON-LD context.

Return values
$this

withAtType()

Sets the internal JSON-LD `@type` attribute.

public withAtType(string $type) : $this

Allows overriding the default type inferred from the class.

Parameters
$type : string

Optional JSON-LD type

Return values
$this

withJSONLDMeta()

Initializes both JSON-LD metadata: `@type` and `@context`.

public withJSONLDMeta([string|null $atType = null ][, string|null $atContext = null ]) : $this

Can be called from constructor or later to override default values.

Parameters
$atType : string|null = null

Optional JSON-LD type

$atContext : string|null = null

Optional JSON-LD context

Return values
$this

        
On this page

Search results