Class luya\web\jsonld\Person

Inheritanceluya\web\jsonld\Person » luya\web\jsonld\BaseThing » yii\base\BaseObject
Implementsluya\web\jsonld\PersonInterface, luya\web\jsonld\ThingInterface, yii\base\Arrayable, yii\base\Configurable
Uses Traitsluya\web\jsonld\PersonTrait, luya\web\jsonld\ThingTrait, yii\base\ArrayableTrait
Available since version1.0.0

JsonLd - Person

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

See also http://schema.org/Person.

Public Properties

Hide inherited properties

Property Type Description Defined By
$additionalName string luya\web\jsonld\PersonTrait
$additionalType string luya\web\jsonld\ThingTrait
$address luya\web\jsonld\PostalAddress|string luya\web\jsonld\PersonTrait
$affiliation luya\web\jsonld\Organization luya\web\jsonld\PersonTrait
$alternateName string luya\web\jsonld\ThingTrait
$award string luya\web\jsonld\PersonTrait
$birthDate string luya\web\jsonld\PersonTrait
$birthPlace luya\web\jsonld\Place luya\web\jsonld\PersonTrait
$brand \luya\web\jsonld\Brand|luya\web\jsonld\Organization luya\web\jsonld\PersonTrait
$children luya\web\jsonld\Person luya\web\jsonld\PersonTrait
$colleague luya\web\jsonld\Person luya\web\jsonld\PersonTrait
$contactPoint luya\web\jsonld\ContactPoint luya\web\jsonld\PersonTrait
$deathDate string luya\web\jsonld\PersonTrait
$deathPlace luya\web\jsonld\Place luya\web\jsonld\PersonTrait
$description string luya\web\jsonld\ThingTrait
$disambiguatingDescription string luya\web\jsonld\ThingTrait
$duns string luya\web\jsonld\PersonTrait
$email string luya\web\jsonld\PersonTrait
$familyName string luya\web\jsonld\PersonTrait
$faxNumber string luya\web\jsonld\PersonTrait
$follows luya\web\jsonld\Person luya\web\jsonld\PersonTrait
$funder luya\web\jsonld\Organization|luya\web\jsonld\Person luya\web\jsonld\PersonTrait
$gender \luya\web\jsonld\GenderType|string luya\web\jsonld\PersonTrait
$givenName string luya\web\jsonld\PersonTrait
$globalLocationNumber string luya\web\jsonld\PersonTrait
$hasPOS luya\web\jsonld\Place luya\web\jsonld\PersonTrait
$height \luya\web\jsonld\Distance|\luya\web\jsonld\QuantitativeValue luya\web\jsonld\PersonTrait
$homeLocation luya\web\jsonld\ContactPoint|luya\web\jsonld\Place luya\web\jsonld\PersonTrait
$honorificPrefix string luya\web\jsonld\PersonTrait
$honorificSuffix string luya\web\jsonld\PersonTrait
$identifier luya\web\jsonld\PropertyValue luya\web\jsonld\ThingTrait
$image luya\web\jsonld\ImageObject luya\web\jsonld\ThingTrait
$isicV4 string luya\web\jsonld\PersonTrait
$jobTitle string luya\web\jsonld\PersonTrait
$knows luya\web\jsonld\Person luya\web\jsonld\PersonTrait
$mainEntityOfPage luya\web\jsonld\CreativeWork luya\web\jsonld\ThingTrait
$makesOffer luya\web\jsonld\Offer luya\web\jsonld\PersonTrait
$memberOf luya\web\jsonld\Organization|\luya\web\jsonld\ProgramMembership luya\web\jsonld\PersonTrait
$naics string luya\web\jsonld\PersonTrait
$name string luya\web\jsonld\ThingTrait
$nationality luya\web\jsonld\Country luya\web\jsonld\PersonTrait
$offers luya\web\jsonld\Offer luya\web\jsonld\ThingTrait
$parent luya\web\jsonld\Person luya\web\jsonld\PersonTrait
$performerIn luya\web\jsonld\Event luya\web\jsonld\PersonTrait
$publishingPrinciples luya\web\jsonld\CreativeWork|\luya\web\jsonld\URL luya\web\jsonld\PersonTrait
$relatedTo luya\web\jsonld\Person luya\web\jsonld\PersonTrait
$sameAs string luya\web\jsonld\ThingTrait
$sibling luya\web\jsonld\Person luya\web\jsonld\PersonTrait
$sponsor luya\web\jsonld\Organization|luya\web\jsonld\Person luya\web\jsonld\PersonTrait
$spouse luya\web\jsonld\Person luya\web\jsonld\PersonTrait
$subjectOf luya\web\jsonld\CreativeWork|luya\web\jsonld\Event luya\web\jsonld\ThingTrait
$taxID string luya\web\jsonld\PersonTrait
$telephone string luya\web\jsonld\PersonTrait
$url string luya\web\jsonld\ThingTrait
$vatID string luya\web\jsonld\PersonTrait
$workLocation luya\web\jsonld\ContactPoint|luya\web\jsonld\Place luya\web\jsonld\PersonTrait
$worksFor luya\web\jsonld\Organization luya\web\jsonld\PersonTrait

Public Methods

Hide inherited methods

Method Description Defined By
__call() Calls the named method which is not a class method. yii\base\BaseObject
__construct() Constructor. yii\base\BaseObject
__get() Returns the value of an object property. yii\base\BaseObject
__isset() Checks if a property is set, i.e. defined and not null. yii\base\BaseObject
__set() Sets value of an object property. yii\base\BaseObject
__unset() Sets an object property to null. yii\base\BaseObject
canGetProperty() Returns a value indicating whether a property can be read. yii\base\BaseObject
canSetProperty() Returns a value indicating whether a property can be set. yii\base\BaseObject
className() Returns the fully qualified name of this class. yii\base\BaseObject
extraFields() Returns the list of fields that can be expanded further and returned by toArray(). yii\base\ArrayableTrait
fields() Returns the list of fields that should be returned by default by toArray() when no specific fields are specified. yii\base\ArrayableTrait
getAdditionalName() luya\web\jsonld\PersonTrait
getAdditionalType() luya\web\jsonld\ThingTrait
getAddress() luya\web\jsonld\PersonTrait
getAffiliation() luya\web\jsonld\PersonTrait
getAlternateName() luya\web\jsonld\ThingTrait
getAward() luya\web\jsonld\PersonTrait
getBirthDate() luya\web\jsonld\PersonTrait
getBirthPlace() luya\web\jsonld\PersonTrait
getBrand() luya\web\jsonld\PersonTrait
getChildren() luya\web\jsonld\PersonTrait
getColleague() luya\web\jsonld\PersonTrait
getContactPoint() luya\web\jsonld\PersonTrait
getDeathDate() luya\web\jsonld\PersonTrait
getDeathPlace() luya\web\jsonld\PersonTrait
getDescription() luya\web\jsonld\ThingTrait
getDisambiguatingDescription() luya\web\jsonld\ThingTrait
getDuns() luya\web\jsonld\PersonTrait
getEmail() luya\web\jsonld\PersonTrait
getFamilyName() luya\web\jsonld\PersonTrait
getFaxNumber() luya\web\jsonld\PersonTrait
getFollows() luya\web\jsonld\PersonTrait
getFunder() luya\web\jsonld\PersonTrait
getGender() luya\web\jsonld\PersonTrait
getGivenName() luya\web\jsonld\PersonTrait
getGlobalLocationNumber() luya\web\jsonld\PersonTrait
getHasPOS() luya\web\jsonld\PersonTrait
getHeight() luya\web\jsonld\PersonTrait
getHomeLocation() luya\web\jsonld\PersonTrait
getHonorificPrefix() luya\web\jsonld\PersonTrait
getHonorificSuffix() luya\web\jsonld\PersonTrait
getIdentifier() luya\web\jsonld\ThingTrait
getImage() luya\web\jsonld\ThingTrait
getIsicV4() luya\web\jsonld\PersonTrait
getJobTitle() luya\web\jsonld\PersonTrait
getKnows() luya\web\jsonld\PersonTrait
getMainEntityOfPage() luya\web\jsonld\ThingTrait
getMakesOffer() luya\web\jsonld\PersonTrait
getMemberOf() luya\web\jsonld\PersonTrait
getNaics() luya\web\jsonld\PersonTrait
getName() luya\web\jsonld\ThingTrait
getNationality() luya\web\jsonld\PersonTrait
getOffers() Get Offer luya\web\jsonld\ThingTrait
getParent() luya\web\jsonld\PersonTrait
getPerformerIn() luya\web\jsonld\PersonTrait
getPublishingPrinciples() luya\web\jsonld\PersonTrait
getRelatedTo() luya\web\jsonld\PersonTrait
getSameAs() luya\web\jsonld\ThingTrait
getSibling() luya\web\jsonld\PersonTrait
getSponsor() luya\web\jsonld\PersonTrait
getSpouse() luya\web\jsonld\PersonTrait
getSubjectOf() luya\web\jsonld\ThingTrait
getTaxID() luya\web\jsonld\PersonTrait
getTelephone() luya\web\jsonld\PersonTrait
getUrl() luya\web\jsonld\ThingTrait
getVatID() luya\web\jsonld\PersonTrait
getWorkLocation() luya\web\jsonld\PersonTrait
getWorksFor() luya\web\jsonld\PersonTrait
hasMethod() Returns a value indicating whether a method is defined. yii\base\BaseObject
hasProperty() Returns a value indicating whether a property is defined. yii\base\BaseObject
init() Initializes the object. yii\base\BaseObject
resolveGetterMethods() Find all getter methods. luya\web\jsonld\BaseThing
setAdditionalName() An additional name for a Person, can be used for a middle name. luya\web\jsonld\PersonTrait
setAdditionalType() An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. luya\web\jsonld\ThingTrait
setAddress() Physical address of the item. luya\web\jsonld\PersonTrait
setAffiliation() An organization that this person is affiliated with. For example, a school/university, a club, or a team. luya\web\jsonld\PersonTrait
setAlternateName() An alias for the item luya\web\jsonld\ThingTrait
setAward() An award won by or for this item. luya\web\jsonld\PersonTrait
setBirthDate() Date of birth. luya\web\jsonld\PersonTrait
setBirthPlace() The place where the person was born. luya\web\jsonld\PersonTrait
setBrand() The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. luya\web\jsonld\PersonTrait
setChildren() A child of the person. luya\web\jsonld\PersonTrait
setColleague() A colleague of the person. luya\web\jsonld\PersonTrait
setContactPoint() A contact point for a person or organization. luya\web\jsonld\PersonTrait
setDeathDate() Date of death. luya\web\jsonld\PersonTrait
setDeathPlace() The place where the person died. luya\web\jsonld\PersonTrait
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
setDuns() The Dun & Bradstreet DUNS number for identifying an organization or business person. luya\web\jsonld\PersonTrait
setEmail() Email address. luya\web\jsonld\PersonTrait
setFamilyName() Family name. In the U.S., the last name of an Person. luya\web\jsonld\PersonTrait
setFaxNumber() The fax number. luya\web\jsonld\PersonTrait
setFollows() The most generic uni-directional social relation. luya\web\jsonld\PersonTrait
setFunder() A person or organization that supports (sponsors) something through some kind of financial contribution. luya\web\jsonld\PersonTrait
setGender() Gender of the person. While http://schema.org/Male and http://schema.org/Female may be used, text strings are also acceptable for people who do not identify as a binary gender. luya\web\jsonld\PersonTrait
setGivenName() Given name. In the U.S., the first name of a Person. luya\web\jsonld\PersonTrait
setGlobalLocationNumber() The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. luya\web\jsonld\PersonTrait
setHasPOS() Points-of-Sales operated by the organization or person. luya\web\jsonld\PersonTrait
setHeight() The height of the item. luya\web\jsonld\PersonTrait
setHomeLocation() A contact location for a person's residence. luya\web\jsonld\PersonTrait
setHonorificPrefix() An honorific prefix preceding a Person's name such as Dr/Mrs/Mr. luya\web\jsonld\PersonTrait
setHonorificSuffix() An honorific suffix preceding a Person's name such as M.D. /PhD/MSCSW. luya\web\jsonld\PersonTrait
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
setIsicV4() The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. luya\web\jsonld\PersonTrait
setJobTitle() The job title of the person (for example, Financial Manager). luya\web\jsonld\PersonTrait
setKnows() The most generic bi-directional social/work relation. luya\web\jsonld\PersonTrait
setMainEntityOfPage() Indicates a page (or other CreativeWork) for which this thing is the main entity being described. luya\web\jsonld\ThingTrait
setMakesOffer() A pointer to products or services offered by the organization or person. luya\web\jsonld\PersonTrait
setMemberOf() An Organization (or ProgramMembership) to which this Person or Organization belongs. luya\web\jsonld\PersonTrait
setNaics() The North American Industry Classification System (NAICS) code for a particular organization or business person. luya\web\jsonld\PersonTrait
setName() The name of the item. luya\web\jsonld\ThingTrait
setNationality() Nationality of the person. luya\web\jsonld\PersonTrait
setOffers() Set Offer luya\web\jsonld\ThingTrait
setParent() A parent of this person. Supersedes parents. luya\web\jsonld\PersonTrait
setPerformerIn() Event that this person is a performer or participant in. luya\web\jsonld\PersonTrait
setPublishingPrinciples() 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. luya\web\jsonld\PersonTrait
setRelatedTo() The most generic familial relation. luya\web\jsonld\PersonTrait
setSameAs() URL of a reference Web page that unambiguously indicates the item's identity. luya\web\jsonld\ThingTrait
setSibling() A sibling of the person. Supersedes siblings. luya\web\jsonld\PersonTrait
setSponsor() A person or organization that supports a thing through a pledge, promise, or financial contribution. luya\web\jsonld\PersonTrait
setSpouse() The person's spouse. luya\web\jsonld\PersonTrait
setSubjectOf() A CreativeWork or Event about this Thing. luya\web\jsonld\ThingTrait
setTaxID() The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. luya\web\jsonld\PersonTrait
setTelephone() The telephone number. luya\web\jsonld\PersonTrait
setUrl() URL of the item. luya\web\jsonld\ThingTrait
setVatID() The Value-added Tax ID of the organization or person. luya\web\jsonld\PersonTrait
setWorkLocation() A contact location for a person's place of work. luya\web\jsonld\PersonTrait
setWorksFor() Organizations that the person works for. luya\web\jsonld\PersonTrait
toArray() Converts the model into an array. yii\base\ArrayableTrait
typeDefintion() Contains the jsonLd definton @type value if not null or false. luya\web\jsonld\Person

Protected Methods

Hide inherited methods

Method Description Defined By
extractFieldsFor() Extract nested fields from a fields collection for a given root field Nested fields are separated with dots (.). e.g: "item.id" The previous example would extract "id". yii\base\ArrayableTrait
extractRootFields() Extracts the root field names from nested fields. yii\base\ArrayableTrait
resolveFields() Determines which fields can be returned by toArray(). yii\base\ArrayableTrait

Method Details

Hide inherited methods

__call() public method

Defined in: yii\base\BaseObject::__call()

Calls the named method which is not a class method.

Do not call this method directly as it is a PHP magic method that will be implicitly called when an unknown method is being invoked.

public mixed __call ( $name, $params )
$name string

The method name

$params array

Method parameters

return mixed

The method return value

throws yii\base\UnknownMethodException

when calling unknown method

                public function __call($name, $params)
{
    throw new UnknownMethodException('Calling unknown method: ' . get_class($this) . "::$name()");
}

            
__construct() public method

Defined in: yii\base\BaseObject::__construct()

Constructor.

The default implementation does two things:

  • Initializes the object with the given configuration $config.
  • Call init().

If this method is overridden in a child class, it is recommended that

  • the last parameter of the constructor is a configuration array, like $config here.
  • call the parent implementation at the end of the constructor.
public void __construct ( $config = [] )
$config array

Name-value pairs that will be used to initialize the object properties

                public function __construct($config = [])
{
    if (!empty($config)) {
        Yii::configure($this, $config);
    }
    $this->init();
}

            
__get() public method

Defined in: yii\base\BaseObject::__get()

Returns the value of an object property.

Do not call this method directly as it is a PHP magic method that will be implicitly called when executing $value = $object->property;.

See also __set().

public mixed __get ( $name )
$name string

The property name

return mixed

The property value

throws yii\base\UnknownPropertyException

if the property is not defined

throws yii\base\InvalidCallException

if the property is write-only

                public function __get($name)
{
    $getter = 'get' . $name;
    if (method_exists($this, $getter)) {
        return $this->$getter();
    } elseif (method_exists($this, 'set' . $name)) {
        throw new InvalidCallException('Getting write-only property: ' . get_class($this) . '::' . $name);
    }
    throw new UnknownPropertyException('Getting unknown property: ' . get_class($this) . '::' . $name);
}

            
__isset() public method

Defined in: yii\base\BaseObject::__isset()

Checks if a property is set, i.e. defined and not null.

Do not call this method directly as it is a PHP magic method that will be implicitly called when executing isset($object->property).

Note that if the property is not defined, false will be returned.

See also https://www.php.net/manual/en/function.isset.php.

public boolean __isset ( $name )
$name string

The property name or the event name

return boolean

Whether the named property is set (not null).

                public function __isset($name)
{
    $getter = 'get' . $name;
    if (method_exists($this, $getter)) {
        return $this->$getter() !== null;
    }
    return false;
}

            
__set() public method

Defined in: yii\base\BaseObject::__set()

Sets value of an object property.

Do not call this method directly as it is a PHP magic method that will be implicitly called when executing $object->property = $value;.

See also __get().

public void __set ( $name, $value )
$name string

The property name or the event name

$value mixed

The property value

throws yii\base\UnknownPropertyException

if the property is not defined

throws yii\base\InvalidCallException

if the property is read-only

                public function __set($name, $value)
{
    $setter = 'set' . $name;
    if (method_exists($this, $setter)) {
        $this->$setter($value);
    } elseif (method_exists($this, 'get' . $name)) {
        throw new InvalidCallException('Setting read-only property: ' . get_class($this) . '::' . $name);
    } else {
        throw new UnknownPropertyException('Setting unknown property: ' . get_class($this) . '::' . $name);
    }
}

            
__unset() public method

Defined in: yii\base\BaseObject::__unset()

Sets an object property to null.

Do not call this method directly as it is a PHP magic method that will be implicitly called when executing unset($object->property).

Note that if the property is not defined, this method will do nothing. If the property is read-only, it will throw an exception.

See also https://www.php.net/manual/en/function.unset.php.

public void __unset ( $name )
$name string

The property name

throws yii\base\InvalidCallException

if the property is read only.

                public function __unset($name)
{
    $setter = 'set' . $name;
    if (method_exists($this, $setter)) {
        $this->$setter(null);
    } elseif (method_exists($this, 'get' . $name)) {
        throw new InvalidCallException('Unsetting read-only property: ' . get_class($this) . '::' . $name);
    }
}

            
canGetProperty() public method

Defined in: yii\base\BaseObject::canGetProperty()

Returns a value indicating whether a property can be read.

A property is readable if:

  • the class has a getter method associated with the specified name (in this case, property name is case-insensitive);
  • the class has a member variable with the specified name (when $checkVars is true);

See also canSetProperty().

public boolean canGetProperty ( $name, $checkVars true )
$name string

The property name

$checkVars boolean

Whether to treat member variables as properties

return boolean

Whether the property can be read

                public function canGetProperty($name, $checkVars = true)
{
    return method_exists($this, 'get' . $name) || $checkVars && property_exists($this, $name);
}

            
canSetProperty() public method

Defined in: yii\base\BaseObject::canSetProperty()

Returns a value indicating whether a property can be set.

A property is writable if:

  • the class has a setter method associated with the specified name (in this case, property name is case-insensitive);
  • the class has a member variable with the specified name (when $checkVars is true);

See also canGetProperty().

public boolean canSetProperty ( $name, $checkVars true )
$name string

The property name

$checkVars boolean

Whether to treat member variables as properties

return boolean

Whether the property can be written

                public function canSetProperty($name, $checkVars = true)
{
    return method_exists($this, 'set' . $name) || $checkVars && property_exists($this, $name);
}

            
className() public static method
Deprecated since 2.0.14. On PHP >=5.5, use ::class instead.

Defined in: yii\base\BaseObject::className()

Returns the fully qualified name of this class.

public static string className ( )
return string

The fully qualified name of this class.

                public static function className()
{
    return get_called_class();
}

            
extraFields() public method

Defined in: yii\base\ArrayableTrait::extraFields()

Returns the list of fields that can be expanded further and returned by toArray().

This method is similar to fields() except that the list of fields returned by this method are not returned by default by toArray(). Only when field names to be expanded are explicitly specified when calling toArray(), will their values be exported.

The default implementation returns an empty array.

You may override this method to return a list of expandable fields based on some context information (e.g. the current application user).

See also:

public array extraFields ( )
return array

The list of expandable field names or field definitions. Please refer to fields() on the format of the return value.

                public function extraFields()
{
    return [];
}

            
extractFieldsFor() protected method (available since version 2.0.14)

Defined in: yii\base\ArrayableTrait::extractFieldsFor()

Extract nested fields from a fields collection for a given root field Nested fields are separated with dots (.). e.g: "item.id" The previous example would extract "id".

protected array extractFieldsFor ( array $fields, $rootField )
$fields array

The fields requested for extraction

$rootField string

The root field for which we want to extract the nested fields

return array

Nested fields extracted for the given field

                protected function extractFieldsFor(array $fields, $rootField)
{
    $result = [];
    foreach ($fields as $field) {
        if (0 === strpos($field, "{$rootField}.")) {
            $result[] = preg_replace('/^' . preg_quote($rootField, '/') . '\./i', '', $field);
        }
    }
    return array_unique($result);
}

            
extractRootFields() protected method (available since version 2.0.14)

Defined in: yii\base\ArrayableTrait::extractRootFields()

Extracts the root field names from nested fields.

Nested fields are separated with dots (.). e.g: "item.id" The previous example would extract "item".

protected array extractRootFields ( array $fields )
$fields array

The fields requested for extraction

return array

Root fields extracted from the given nested fields

                protected function extractRootFields(array $fields)
{
    $result = [];
    foreach ($fields as $field) {
        $result[] = current(explode('.', $field, 2));
    }
    if (in_array('*', $result, true)) {
        $result = [];
    }
    return array_unique($result);
}

            
fields() public method

Defined in: yii\base\ArrayableTrait::fields()

Returns the list of fields that should be returned by default by toArray() when no specific fields are specified.

A field is a named element in the returned array by toArray().

This method should return an array of field names or field definitions. If the former, the field name will be treated as an object property name whose value will be used as the field value. If the latter, the array key should be the field name while the array value should be the corresponding field definition which can be either an object property name or a PHP callable returning the corresponding field value. The signature of the callable should be:

function ($model, $field) {
    // return field value
}

For example, the following code declares four fields:

  • email: the field name is the same as the property name email;
  • firstName and lastName: the field names are firstName and lastName, and their values are obtained from the first_name and last_name properties;
  • fullName: the field name is fullName. Its value is obtained by concatenating first_name and last_name.
return [
    'email',
    'firstName' => 'first_name',
    'lastName' => 'last_name',
    'fullName' => function () {
        return $this->first_name . ' ' . $this->last_name;
    },
];

In this method, you may also want to return different lists of fields based on some context information. For example, depending on the privilege of the current application user, you may return different sets of visible fields or filter out some fields.

The default implementation of this method returns the public object member variables indexed by themselves.

See also toArray().

public array fields ( )
return array

The list of field names or field definitions.

                public function fields()
{
    $fields = array_keys(Yii::getObjectVars($this));
    return array_combine($fields, $fields);
}

            
getAdditionalName() public method
public string getAdditionalName ( )

                public function getAdditionalName()
{
    return $this->_additionalName;
}

            
getAdditionalType() public method
public string getAdditionalType ( )

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

            
getAddress() public method
public luya\web\jsonld\PostalAddress|string getAddress ( )

                public function getAddress()
{
    return $this->_address;
}

            
getAffiliation() public method
public luya\web\jsonld\Organization getAffiliation ( )

                public function getAffiliation()
{
    return $this->_affiliation;
}

            
getAlternateName() public method
public string getAlternateName ( )

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

            
getAward() public method
public string getAward ( )

                public function getAward()
{
    return $this->_award;
}

            
getBirthDate() public method
public string getBirthDate ( )

                public function getBirthDate()
{
    return $this->_birthDate;
}

            
getBirthPlace() public method
public luya\web\jsonld\Place getBirthPlace ( )

                public function getBirthPlace()
{
    return $this->_birthPlace;
}

            
getBrand() public method
public \luya\web\jsonld\Brand|luya\web\jsonld\Organization getBrand ( )

                public function getBrand()
{
    return $this->_brand;
}

            
getChildren() public method
public luya\web\jsonld\Person getChildren ( )

                public function getChildren()
{
    return $this->_children;
}

            
getColleague() public method
public luya\web\jsonld\Person getColleague ( )

                public function getColleague()
{
    return $this->_colleague;
}

            
getContactPoint() public method
public luya\web\jsonld\ContactPoint getContactPoint ( )

                public function getContactPoint()
{
    return $this->_contactPoint;
}

            
getDeathDate() public method
public string getDeathDate ( )

                public function getDeathDate()
{
    return $this->_deathDate;
}

            
getDeathPlace() public method
public luya\web\jsonld\Place getDeathPlace ( )

                public function getDeathPlace()
{
    return $this->_deathPlace;
}

            
getDescription() public method
public string getDescription ( )

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

            
getDisambiguatingDescription() public method
public string getDisambiguatingDescription ( )

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

            
getDuns() public method
public string getDuns ( )

                public function getDuns()
{
    return $this->_duns;
}

            
getEmail() public method
public string getEmail ( )

                public function getEmail()
{
    return $this->_email;
}

            
getFamilyName() public method
public string getFamilyName ( )

                public function getFamilyName()
{
    return $this->_familyName;
}

            
getFaxNumber() public method
public string getFaxNumber ( )

                public function getFaxNumber()
{
    return $this->_faxNumber;
}

            
getFollows() public method
public luya\web\jsonld\Person getFollows ( )

                public function getFollows()
{
    return $this->_follows;
}

            
getFunder() public method
public luya\web\jsonld\Organization|luya\web\jsonld\Person getFunder ( )

                public function getFunder()
{
    return $this->_funder;
}

            
getGender() public method
public \luya\web\jsonld\GenderType|string getGender ( )

                public function getGender()
{
    return $this->_gender;
}

            
getGivenName() public method
public string getGivenName ( )

                public function getGivenName()
{
    return $this->_givenName;
}

            
getGlobalLocationNumber() public method
public string getGlobalLocationNumber ( )

                public function getGlobalLocationNumber()
{
    return $this->_globalLocationNumber;
}

            
getHasPOS() public method
public luya\web\jsonld\Place getHasPOS ( )

                public function getHasPOS()
{
    return $this->_hasPOS;
}

            
getHeight() public method
public \luya\web\jsonld\Distance|\luya\web\jsonld\QuantitativeValue getHeight ( )

                public function getHeight()
{
    return $this->_height;
}

            
getHomeLocation() public method
public luya\web\jsonld\ContactPoint|luya\web\jsonld\Place getHomeLocation ( )

                public function getHomeLocation()
{
    return $this->_homeLocation;
}

            
getHonorificPrefix() public method
public string getHonorificPrefix ( )

                public function getHonorificPrefix()
{
    return $this->_honorificPrefix;
}

            
getHonorificSuffix() public method
public string getHonorificSuffix ( )

                public function getHonorificSuffix()
{
    return $this->_honorificSuffix;
}

            
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;
}

            
getIsicV4() public method
public string getIsicV4 ( )

                public function getIsicV4()
{
    return $this->_isicV4;
}

            
getJobTitle() public method
public string getJobTitle ( )

                public function getJobTitle()
{
    return $this->_jobTitle;
}

            
getKnows() public method
public luya\web\jsonld\Person getKnows ( )

                public function getKnows()
{
    return $this->_knows;
}

            
getMainEntityOfPage() public method
public luya\web\jsonld\CreativeWork getMainEntityOfPage ( )

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

            
getMakesOffer() public method
public luya\web\jsonld\Offer getMakesOffer ( )

                public function getMakesOffer()
{
    return $this->_makesOffer;
}

            
getMemberOf() public method
public luya\web\jsonld\Organization|\luya\web\jsonld\ProgramMembership getMemberOf ( )

                public function getMemberOf()
{
    return $this->_memberOf;
}

            
getNaics() public method
public string getNaics ( )

                public function getNaics()
{
    return $this->_naics;
}

            
getName() public method
public string getName ( )

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

            
getNationality() public method
public luya\web\jsonld\Country getNationality ( )

                public function getNationality()
{
    return $this->_nationality;
}

            
getOffers() public method (available since version 1.2.2)
public luya\web\jsonld\Offer getOffers ( )

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

            
getParent() public method
public luya\web\jsonld\Person getParent ( )

                public function getParent()
{
    return $this->_parent;
}

            
getPerformerIn() public method
public luya\web\jsonld\Event getPerformerIn ( )

                public function getPerformerIn()
{
    return $this->_performerIn;
}

            
getPublishingPrinciples() public method
public luya\web\jsonld\CreativeWork|\luya\web\jsonld\URL getPublishingPrinciples ( )

                public function getPublishingPrinciples()
{
    return $this->_publishingPrinciples;
}

            
getRelatedTo() public method
public luya\web\jsonld\Person getRelatedTo ( )

                public function getRelatedTo()
{
    return $this->_relatedTo;
}

            
getSameAs() public method
public string getSameAs ( )

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

            
getSibling() public method
public luya\web\jsonld\Person getSibling ( )

                public function getSibling()
{
    return $this->_sibling;
}

            
getSponsor() public method
public luya\web\jsonld\Organization|luya\web\jsonld\Person getSponsor ( )

                public function getSponsor()
{
    return $this->_sponsor;
}

            
getSpouse() public method
public luya\web\jsonld\Person getSpouse ( )

                public function getSpouse()
{
    return $this->_spouse;
}

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

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

            
getTaxID() public method
public string getTaxID ( )

                public function getTaxID()
{
    return $this->_taxID;
}

            
getTelephone() public method
public string getTelephone ( )

                public function getTelephone()
{
    return $this->_telephone;
}

            
getUrl() public method
public string getUrl ( )

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

            
getVatID() public method
public string getVatID ( )

                public function getVatID()
{
    return $this->_vatID;
}

            
getWorkLocation() public method
public luya\web\jsonld\ContactPoint|luya\web\jsonld\Place getWorkLocation ( )

                public function getWorkLocation()
{
    return $this->_workLocation;
}

            
getWorksFor() public method
public luya\web\jsonld\Organization getWorksFor ( )

                public function getWorksFor()
{
    return $this->_worksFor;
}

            
hasMethod() public method

Defined in: yii\base\BaseObject::hasMethod()

Returns a value indicating whether a method is defined.

The default implementation is a call to php function method_exists(). You may override this method when you implemented the php magic method __call().

public boolean hasMethod ( $name )
$name string

The method name

return boolean

Whether the method is defined

                public function hasMethod($name)
{
    return method_exists($this, $name);
}

            
hasProperty() public method

Defined in: yii\base\BaseObject::hasProperty()

Returns a value indicating whether a property is defined.

A property is defined if:

  • the class has a getter or setter method associated with the specified name (in this case, property name is case-insensitive);
  • the class has a member variable with the specified name (when $checkVars is true);

See also:

public boolean hasProperty ( $name, $checkVars true )
$name string

The property name

$checkVars boolean

Whether to treat member variables as properties

return boolean

Whether the property is defined

                public function hasProperty($name, $checkVars = true)
{
    return $this->canGetProperty($name, $checkVars) || $this->canSetProperty($name, false);
}

            
init() public method

Defined in: yii\base\BaseObject::init()

Initializes the object.

This method is invoked at the end of the constructor after the object is initialized with the given configuration.

public void init ( )

                public function init()
{
}

            
resolveFields() protected method

Defined in: yii\base\ArrayableTrait::resolveFields()

Determines which fields can be returned by toArray().

This method will first extract the root fields from the given fields. Then it will check the requested root fields against those declared in fields() and extraFields() to determine which fields can be returned.

protected array resolveFields ( array $fields, array $expand )
$fields array

The fields being requested for exporting

$expand array

The additional fields being requested for exporting

return array

The list of fields to be exported. The array keys are the field names, and the array values are the corresponding object property names or PHP callables returning the field values.

                protected function resolveFields(array $fields, array $expand)
{
    $fields = $this->extractRootFields($fields);
    $expand = $this->extractRootFields($expand);
    $result = [];
    foreach ($this->fields() as $field => $definition) {
        if (is_int($field)) {
            $field = $definition;
        }
        if (empty($fields) || in_array($field, $fields, true)) {
            $result[$field] = $definition;
        }
    }
    if (empty($expand)) {
        return $result;
    }
    foreach ($this->extraFields() as $field => $definition) {
        if (is_int($field)) {
            $field = $definition;
        }
        if (in_array($field, $expand, true)) {
            $result[$field] = $definition;
        }
    }
    return $result;
}

            
resolveGetterMethods() public method

Defined in: luya\web\jsonld\BaseThing::resolveGetterMethods()

Find all getter methods.

public array resolveGetterMethods ( )

                public function resolveGetterMethods()
{
    $resolved = [];
    $methods = get_class_methods($this);
    
    if (!$methods) {
        return [];
    }
    
    foreach ($methods as $method) {
        if (StringHelper::startsWith($method, 'get', true)) {
            $resolved[] = lcfirst(StringHelper::replaceFirst('get', '', $method));
        }
    }
    
    asort($resolved);
    
    return $resolved;
}

            
setAdditionalName() public method

Defined in: luya\web\jsonld\PersonTrait::setAdditionalName()

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

public static setAdditionalName ( $additionalName )
$additionalName string

                public function setAdditionalName($additionalName)
{
    $this->_additionalName = $additionalName;
    return $this;
}

            
setAdditionalType() public method

Defined in: luya\web\jsonld\ThingTrait::setAdditionalType()

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;
}

            
setAddress() public method

Defined in: luya\web\jsonld\PersonTrait::setAddress()

Physical address of the item.

public static setAddress ( luya\web\jsonld\PostalAddress $address )
$address luya\web\jsonld\PostalAddress|string

                public function setAddress(PostalAddress $address)
{
    $this->_address = $address;
    return $this;
}

            
setAffiliation() public method

Defined in: luya\web\jsonld\PersonTrait::setAffiliation()

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

public static setAffiliation ( luya\web\jsonld\Organization $affiliation )
$affiliation luya\web\jsonld\Organization

                public function setAffiliation(Organization $affiliation)
{
    $this->_affiliation = $affiliation;
    return $this;
}

            
setAlternateName() public method

Defined in: luya\web\jsonld\ThingTrait::setAlternateName()

An alias for the item

public static setAlternateName ( $alternateName )
$alternateName string

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

            
setAward() public method

Defined in: luya\web\jsonld\PersonTrait::setAward()

An award won by or for this item.

Supersedes awards.

public static setAward ( $award )
$award string

                public function setAward($award)
{
    $this->_award = $award;
    return $this;
}

            
setBirthDate() public method

Defined in: luya\web\jsonld\PersonTrait::setBirthDate()

Date of birth.

public static setBirthDate ( luya\web\jsonld\DateValue $birthDate )
$birthDate luya\web\jsonld\DateValue

                public function setBirthDate(DateValue $birthDate)
{
    $this->_birthDate = $birthDate->getValue();
    return $this;
}

            
setBirthPlace() public method

Defined in: luya\web\jsonld\PersonTrait::setBirthPlace()

The place where the person was born.

public static setBirthPlace ( $birthPlace )
$birthPlace luya\web\jsonld\Place

                public function setBirthPlace($birthPlace)
{
    $this->_birthPlace = $birthPlace;
    return $this;
}

            
setBrand() public method

Defined in: luya\web\jsonld\PersonTrait::setBrand()

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

public static setBrand ( $brand )
$brand \luya\web\jsonld\Brand|luya\web\jsonld\Organization

                public function setBrand($brand)
{
    $this->_brand = $brand;
    return $this;
}

            
setChildren() public method

Defined in: luya\web\jsonld\PersonTrait::setChildren()

A child of the person.

public static setChildren ( luya\web\jsonld\Person $children )
$children luya\web\jsonld\Person

                public function setChildren(Person $children)
{
    $this->_children = $children;
    return $this;
}

            
setColleague() public method

Defined in: luya\web\jsonld\PersonTrait::setColleague()

A colleague of the person.

Supersedes colleagues.

public static setColleague ( luya\web\jsonld\Person $colleague )
$colleague luya\web\jsonld\Person

                public function setColleague(Person $colleague)
{
    $this->_colleague = $colleague;
    return $this;
}

            
setContactPoint() public method

Defined in: luya\web\jsonld\PersonTrait::setContactPoint()

A contact point for a person or organization.

Supersedes contactPoints.

public static setContactPoint ( luya\web\jsonld\ContactPoint $contactPoint )
$contactPoint luya\web\jsonld\ContactPoint

                public function setContactPoint(ContactPoint $contactPoint)
{
    $this->_contactPoint = $contactPoint;
    return $this;
}

            
setDeathDate() public method

Defined in: luya\web\jsonld\PersonTrait::setDeathDate()

Date of death.

public static setDeathDate ( luya\web\jsonld\DateValue $deathDate )
$deathDate luya\web\jsonld\DateValue

                public function setDeathDate(DateValue $deathDate)
{
    $this->_deathDate = $deathDate->getValue();
    return $this;
}

            
setDeathPlace() public method

Defined in: luya\web\jsonld\PersonTrait::setDeathPlace()

The place where the person died.

public static setDeathPlace ( luya\web\jsonld\Place $deathPlace )
$deathPlace luya\web\jsonld\Place

                public function setDeathPlace(Place $deathPlace)
{
    $this->_deathPlace = $deathPlace;
    return $this;
}

            
setDescription() public method

Defined in: luya\web\jsonld\ThingTrait::setDescription()

A description of the item.

public static setDescription ( $description )
$description string

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

            
setDisambiguatingDescription() public method

Defined in: luya\web\jsonld\ThingTrait::setDisambiguatingDescription()

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;
}

            
setDuns() public method

Defined in: luya\web\jsonld\PersonTrait::setDuns()

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

public static setDuns ( luya\web\jsonld\Person $duns )
$duns string

                public function setDuns(Person $duns)
{
    $this->_duns = $duns;
    return $this;
}

            
setEmail() public method

Defined in: luya\web\jsonld\PersonTrait::setEmail()

Email address.

public static setEmail ( $email )
$email string

                public function setEmail($email)
{
    $this->_email = $email;
    return $this;
}

            
setFamilyName() public method

Defined in: luya\web\jsonld\PersonTrait::setFamilyName()

Family name. In the U.S., the last name of an Person.

This can be used along with givenName instead of the name property.

public static setFamilyName ( $familyName )
$familyName string

                public function setFamilyName($familyName)
{
    $this->_familyName = $familyName;
    return $this;
}

            
setFaxNumber() public method

Defined in: luya\web\jsonld\PersonTrait::setFaxNumber()

The fax number.

public static setFaxNumber ( $faxNumber )
$faxNumber string

                public function setFaxNumber($faxNumber)
{
    $this->_faxNumber = $faxNumber;
    return $this;
}

            
setFollows() public method

Defined in: luya\web\jsonld\PersonTrait::setFollows()

The most generic uni-directional social relation.

public static setFollows ( luya\web\jsonld\Person $follows )
$follows luya\web\jsonld\Person

                public function setFollows(Person $follows)
{
    $this->_follows = $follows;
    return $this;
}

            
setFunder() public method

Defined in: luya\web\jsonld\PersonTrait::setFunder()

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

public static setFunder ( $funder )
$funder luya\web\jsonld\Organization|luya\web\jsonld\Person

                public function setFunder($funder)
{
    ObjectHelper::isInstanceOf($funder, [Organization::class, PersonInterface::class]);
    
    $this->_funder = $funder;
    return $this;
}

            
setGender() public method

Defined in: luya\web\jsonld\PersonTrait::setGender()

Gender of the person. While http://schema.org/Male and http://schema.org/Female may be used, text strings are also acceptable for people who do not identify as a binary gender.

public static setGender ( $gender )
$gender \luya\web\jsonld\GenderType|string

                public function setGender($gender)
{
    $this->_gender = $gender;
    return $this;
}

            
setGivenName() public method

Defined in: luya\web\jsonld\PersonTrait::setGivenName()

Given name. In the U.S., the first name of a Person.

This can be used along with familyName instead of the name property.

public static setGivenName ( $givenName )
$givenName string

                public function setGivenName($givenName)
{
    $this->_givenName = $givenName;
    return $this;
}

            
setGlobalLocationNumber() public method

Defined in: luya\web\jsonld\PersonTrait::setGlobalLocationNumber()

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

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

public static setGlobalLocationNumber ( $globalLocationNumber )
$globalLocationNumber string

                public function setGlobalLocationNumber($globalLocationNumber)
{
    $this->_globalLocationNumber = $globalLocationNumber;
    return $this;
}

            
setHasPOS() public method

Defined in: luya\web\jsonld\PersonTrait::setHasPOS()

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

public static setHasPOS ( $hasPOS )
$hasPOS luya\web\jsonld\Place

                public function setHasPOS($hasPOS)
{
    $this->_hasPOS = $hasPOS;
    return $this;
}

            
setHeight() public method

Defined in: luya\web\jsonld\PersonTrait::setHeight()

The height of the item.

public static setHeight ( $height )
$height \luya\web\jsonld\Distance|\luya\web\jsonld\QuantitativeValue

                public function setHeight($height)
{
    $this->_height = $height;
    return $this;
}

            
setHomeLocation() public method

Defined in: luya\web\jsonld\PersonTrait::setHomeLocation()

A contact location for a person's residence.

public static setHomeLocation ( $homeLocation )
$homeLocation luya\web\jsonld\ContactPoint|luya\web\jsonld\Place

                public function setHomeLocation($homeLocation)
{
    $this->_homeLocation = $homeLocation;
    return $this;
}

            
setHonorificPrefix() public method

Defined in: luya\web\jsonld\PersonTrait::setHonorificPrefix()

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

public static setHonorificPrefix ( $honorificPrefix )
$honorificPrefix string

                public function setHonorificPrefix($honorificPrefix)
{
    $this->_honorificPrefix = $honorificPrefix;
    return $this;
}

            
setHonorificSuffix() public method

Defined in: luya\web\jsonld\PersonTrait::setHonorificSuffix()

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

public static setHonorificSuffix ( $honorificSuffix )
$honorificSuffix string

                public function setHonorificSuffix($honorificSuffix)
{
    $this->_honorificSuffix = $honorificSuffix;
    return $this;
}

            
setIdentifier() public method

Defined in: 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.

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

Defined in: luya\web\jsonld\ThingTrait::setImage()

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;
}

            
setIsicV4() public method

Defined in: luya\web\jsonld\PersonTrait::setIsicV4()

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

public static setIsicV4 ( $isicV4 )
$isicV4 string

                public function setIsicV4($isicV4)
{
    $this->_isicV4 = $isicV4;
    return $this;
}

            
setJobTitle() public method

Defined in: luya\web\jsonld\PersonTrait::setJobTitle()

The job title of the person (for example, Financial Manager).

public static setJobTitle ( $jobTitle )
$jobTitle string

                public function setJobTitle($jobTitle)
{
    $this->_jobTitle = $jobTitle;
    return $this;
}

            
setKnows() public method

Defined in: luya\web\jsonld\PersonTrait::setKnows()

The most generic bi-directional social/work relation.

public static setKnows ( luya\web\jsonld\Person $knows )
$knows luya\web\jsonld\Person

                public function setKnows(Person $knows)
{
    $this->_knows = $knows;
    return $this;
}

            
setMainEntityOfPage() public method

Defined in: luya\web\jsonld\ThingTrait::setMainEntityOfPage()

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;
}

            
setMakesOffer() public method

Defined in: luya\web\jsonld\PersonTrait::setMakesOffer()

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

Inverse property: offeredBy.

public static setMakesOffer ( luya\web\jsonld\Offer $makesOffer )
$makesOffer luya\web\jsonld\Offer

                public function setMakesOffer(Offer $makesOffer)
{
    $this->_makesOffer = $makesOffer;
    return $this;
}

            
setMemberOf() public method

Defined in: luya\web\jsonld\PersonTrait::setMemberOf()

An Organization (or ProgramMembership) to which this Person or Organization belongs.

Inverse property: member.

public static setMemberOf ( $memberOf )
$memberOf luya\web\jsonld\Organization|\luya\web\jsonld\ProgramMembership

                public function setMemberOf($memberOf)
{
    $this->_memberOf = $memberOf;
    return $this;
}

            
setNaics() public method

Defined in: luya\web\jsonld\PersonTrait::setNaics()

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

public static setNaics ( $naics )
$naics string

                public function setNaics($naics)
{
    $this->_naics = $naics;
    return $this;
}

            
setName() public method

Defined in: luya\web\jsonld\ThingTrait::setName()

The name of the item.

public static setName ( $name )
$name string

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

            
setNationality() public method

Defined in: luya\web\jsonld\PersonTrait::setNationality()

Nationality of the person.

public static setNationality ( luya\web\jsonld\Country $nationality )
$nationality luya\web\jsonld\Country

                public function setNationality(Country $nationality)
{
    $this->_nationality = $nationality;
    return $this;
}

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

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

            
setParent() public method

Defined in: luya\web\jsonld\PersonTrait::setParent()

A parent of this person. Supersedes parents.

public static setParent ( luya\web\jsonld\Person $parent )
$parent luya\web\jsonld\Person

                public function setParent(Person $parent)
{
    $this->_parent = $parent;
    return $this;
}

            
setPerformerIn() public method

Defined in: luya\web\jsonld\PersonTrait::setPerformerIn()

Event that this person is a performer or participant in.

public static setPerformerIn ( luya\web\jsonld\Event $performerIn )
$performerIn luya\web\jsonld\Event

                public function setPerformerIn(Event $performerIn)
{
    $this->_performerIn = $performerIn;
    return $this;
}

            
setPublishingPrinciples() public method

Defined in: luya\web\jsonld\PersonTrait::setPublishingPrinciples()

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.

While such policies are most typically expressed in natural language, sometimes related information (e.g. indicating a funder) can be expressed using schema.org terminology.

public static setPublishingPrinciples ( $publishingPrinciples )
$publishingPrinciples luya\web\jsonld\CreativeWork|\luya\web\jsonld\URL

                public function setPublishingPrinciples($publishingPrinciples)
{
    $this->_publishingPrinciples = $publishingPrinciples;
    return $this;
}

            
setRelatedTo() public method

Defined in: luya\web\jsonld\PersonTrait::setRelatedTo()

The most generic familial relation.

public static setRelatedTo ( luya\web\jsonld\Person $relatedTo )
$relatedTo luya\web\jsonld\Person

                public function setRelatedTo(Person $relatedTo)
{
    $this->_relatedTo = $relatedTo;
    return $this;
}

            
setSameAs() public method

Defined in: luya\web\jsonld\ThingTrait::setSameAs()

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;
}

            
setSibling() public method

Defined in: luya\web\jsonld\PersonTrait::setSibling()

A sibling of the person. Supersedes siblings.

public static setSibling ( luya\web\jsonld\Person $sibling )
$sibling luya\web\jsonld\Person

                public function setSibling(Person $sibling)
{
    $this->_sibling = $sibling;
    return $this;
}

            
setSponsor() public method

Defined in: luya\web\jsonld\PersonTrait::setSponsor()

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 static setSponsor ( $sponsor )
$sponsor luya\web\jsonld\Organization|luya\web\jsonld\Person

                public function setSponsor($sponsor)
{
    ObjectHelper::isInstanceOf($sponsor, [Organization::class, PersonInterface::class]);
    
    $this->_sponsor = $sponsor;
    return $this;
}

            
setSpouse() public method

Defined in: luya\web\jsonld\PersonTrait::setSpouse()

The person's spouse.

public static setSpouse ( luya\web\jsonld\Person $spouse )
$spouse luya\web\jsonld\Person

                public function setSpouse(Person $spouse)
{
    $this->_spouse = $spouse;
    return $this;
}

            
setSubjectOf() public method

Defined in: luya\web\jsonld\ThingTrait::setSubjectOf()

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;
}

            
setTaxID() public method

Defined in: luya\web\jsonld\PersonTrait::setTaxID()

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

public static setTaxID ( $taxID )
$taxID string

                public function setTaxID($taxID)
{
    $this->_taxID = $taxID;
    return $this;
}

            
setTelephone() public method

Defined in: luya\web\jsonld\PersonTrait::setTelephone()

The telephone number.

public static setTelephone ( $telephone )
$telephone string

                public function setTelephone($telephone)
{
    $this->_telephone = $telephone;
    return $this;
}

            
setUrl() public method

Defined in: luya\web\jsonld\ThingTrait::setUrl()

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;
}

            
setVatID() public method

Defined in: luya\web\jsonld\PersonTrait::setVatID()

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

public static setVatID ( $vatID )
$vatID string

                public function setVatID($vatID)
{
    $this->_vatID = $vatID;
    return $this;
}

            
setWorkLocation() public method

Defined in: luya\web\jsonld\PersonTrait::setWorkLocation()

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

public static setWorkLocation ( $workLocation )
$workLocation luya\web\jsonld\ContactPoint|luya\web\jsonld\Place

                public function setWorkLocation($workLocation)
{
    $this->_workLocation = $workLocation;
    return $this;
}

            
setWorksFor() public method

Defined in: luya\web\jsonld\PersonTrait::setWorksFor()

Organizations that the person works for.

public static setWorksFor ( luya\web\jsonld\Organization $worksFor )
$worksFor luya\web\jsonld\Organization

                public function setWorksFor(Organization $worksFor)
{
    $this->_worksFor = $worksFor;
    return $this;
}

            
toArray() public method

Defined in: yii\base\ArrayableTrait::toArray()

Converts the model into an array.

This method will first identify which fields to be included in the resulting array by calling resolveFields(). It will then turn the model into an array with these fields. If $recursive is true, any embedded objects will also be converted into arrays. When embedded objects are yii\base\Arrayable, their respective nested fields will be extracted and passed to toArray().

If the model implements the yii\web\Linkable interface, the resulting array will also have a _link element which refers to a list of links as specified by the interface.

public array toArray ( array $fields = [], array $expand = [], $recursive true )
$fields array

The fields being requested. If empty or if it contains '*', all fields as specified by fields() will be returned. Fields can be nested, separated with dots (.). e.g.: item.field.sub-field $recursive must be true for nested fields to be extracted. If $recursive is false, only the root fields will be extracted.

$expand array

The additional fields being requested for exporting. Only fields declared in extraFields() will be considered. Expand can also be nested, separated with dots (.). e.g.: item.expand1.expand2 $recursive must be true for nested expands to be extracted. If $recursive is false, only the root expands will be extracted.

$recursive boolean

Whether to recursively return array representation of embedded objects.

return array

The array representation of the object

                public function toArray(array $fields = [], array $expand = [], $recursive = true)
{
    $data = [];
    foreach ($this->resolveFields($fields, $expand) as $field => $definition) {
        $attribute = is_string($definition) ? $this->$definition : $definition($this, $field);
        if ($recursive) {
            $nestedFields = $this->extractFieldsFor($fields, $field);
            $nestedExpand = $this->extractFieldsFor($expand, $field);
            if ($attribute instanceof Arrayable) {
                $attribute = $attribute->toArray($nestedFields, $nestedExpand);
            } elseif ($attribute instanceof \JsonSerializable) {
                $attribute = $attribute->jsonSerialize();
            } elseif (is_array($attribute)) {
                $attribute = array_map(
                    function ($item) use ($nestedFields, $nestedExpand) {
                        if ($item instanceof Arrayable) {
                            return $item->toArray($nestedFields, $nestedExpand);
                        } elseif ($item instanceof \JsonSerializable) {
                            return $item->jsonSerialize();
                        }
                        return $item;
                    },
                    $attribute
                );
            }
        }
        $data[$field] = $attribute;
    }
    if ($this instanceof Linkable) {
        $data['_links'] = Link::serialize($this->getLinks());
    }
    return $recursive ? ArrayHelper::toArray($data) : $data;
}

            
typeDefintion() public method

Contains the jsonLd definton @type value if not null or false.

public boolean|string typeDefintion ( )
return boolean|string

Generates the @type field.

                public function typeDefintion()
{
    return 'Person';
}