gedcomx-php
  • Namespace
  • Class

Namespaces

  • Gedcomx
    • Agent
    • Atom
    • Common
    • Conclusion
    • Extensions
      • FamilySearch
        • Platform
          • Artifacts
          • Discussions
          • Tree
          • Users
        • Rt
        • Types
    • GedcomxFile
    • Links
    • Records
    • Rt
    • Search
    • Source
    • Support
    • Types
    • Util
    • Vocab

Classes

  • Gedcomx

Class Gedcomx

The GEDCOM X data formats define the serialization formats of the GEDCOM X conceptual model. The canonical documentation is provided by the formal specification documents:

  • The GEDCOM X Conceptual Model, Version 1.0
  • The GEDCOM X JSON Format, Version 1.0
  • The GEDCOM X XML Format, Version 1.0

This documentation is provided as a non-normative reference guide.

Gedcomx\Common\ExtensibleData
Extended by Gedcomx\Links\HypermediaEnabledData implements Gedcomx\Links\SupportsLinks
Extended by Gedcomx\Gedcomx

Direct known subclasses

Gedcomx\Extensions\FamilySearch\FamilySearchPlatform

Namespace: Gedcomx
Located at Gedcomx.php

Methods summary

public
# __construct( mixed $o = null )

Constructs a Gedcomx from a (parsed) JSON hash

Constructs a Gedcomx from a (parsed) JSON hash

Parameters

$o
Either an array (JSON) or an XMLReader.

Throws

Exception

Overrides

Gedcomx\Links\HypermediaEnabledData::__construct
public string
# getLang( )

The language of the genealogical data.

The language of the genealogical data.

Returns

string
public
# setLang( string $lang )

The language of the genealogical data.

The language of the genealogical data.

Parameters

$lang
public string
# getDescriptionRef( )

A reference to a description of this data set.

A reference to a description of this data set.

Returns

string
public
# setDescriptionRef( string $descriptionRef )

A reference to a description of this data set.

A reference to a description of this data set.

Parameters

$descriptionRef
public string
# getProfile( )

A reference to the profile that describes this data set.

A reference to the profile that describes this data set.

Returns

string
public
# setProfile( string $profile )

A reference to the profile that describes this data set.

A reference to the profile that describes this data set.

Parameters

$profile
public Gedcomx\Common\Attribution
# getAttribution( )

The attribution of this genealogical data.

The attribution of this genealogical data.

Returns

Gedcomx\Common\Attribution
public
# setAttribution( Gedcomx\Common\Attribution $attribution )

The attribution of this genealogical data.

The attribution of this genealogical data.

Parameters

$attribution
public Gedcomx\Conclusion\Person[]
# getPersons( )

The persons included in this genealogical data set.

The persons included in this genealogical data set.

Returns

Gedcomx\Conclusion\Person[]
public
# setPersons( Gedcomx\Conclusion\Person[] $persons )

The persons included in this genealogical data set.

The persons included in this genealogical data set.

Parameters

$persons
public Gedcomx\Conclusion\Relationship[]
# getRelationships( )

The relationships included in this genealogical data set.

The relationships included in this genealogical data set.

Returns

Gedcomx\Conclusion\Relationship[]
public
# setRelationships( Gedcomx\Conclusion\Relationship[] $relationships )

The relationships included in this genealogical data set.

The relationships included in this genealogical data set.

Parameters

$relationships
public Gedcomx\Source\SourceDescription[]
# getSourceDescriptions( )

The descriptions of sources included in this genealogical data set.

The descriptions of sources included in this genealogical data set.

Returns

Gedcomx\Source\SourceDescription[]
public
# setSourceDescriptions( Gedcomx\Source\SourceDescription[] $sourceDescriptions )

The descriptions of sources included in this genealogical data set.

The descriptions of sources included in this genealogical data set.

Parameters

$sourceDescriptions
public Gedcomx\Agent\Agent[]
# getAgents( )

The agents included in this genealogical data set.

The agents included in this genealogical data set.

Returns

Gedcomx\Agent\Agent[]
public
# setAgents( Gedcomx\Agent\Agent[] $agents )

The agents included in this genealogical data set.

The agents included in this genealogical data set.

Parameters

$agents
public Gedcomx\Conclusion\Event[]
# getEvents( )

The events included in this genealogical data set.

The events included in this genealogical data set.

Returns

Gedcomx\Conclusion\Event[]
public
# setEvents( Gedcomx\Conclusion\Event[] $events )

The events included in this genealogical data set.

The events included in this genealogical data set.

Parameters

$events
public Gedcomx\Conclusion\PlaceDescription[]
# getPlaces( )

The places included in this genealogical data set.

The places included in this genealogical data set.

Returns

Gedcomx\Conclusion\PlaceDescription[]
public
# setPlaces( Gedcomx\Conclusion\PlaceDescription[] $places )

The places included in this genealogical data set.

The places included in this genealogical data set.

Parameters

$places
public Gedcomx\Conclusion\Document[]
# getDocuments( )

The documents included in this genealogical data set.

The documents included in this genealogical data set.

Returns

Gedcomx\Conclusion\Document[]
public
# setDocuments( Gedcomx\Conclusion\Document[] $documents )

The documents included in this genealogical data set.

The documents included in this genealogical data set.

Parameters

$documents
public Gedcomx\Records\Collection[]
# getCollections( )

The collections included in this genealogical data set.

The collections included in this genealogical data set.

Returns

Gedcomx\Records\Collection[]
public
# setCollections( Gedcomx\Records\Collection[] $collections )

The collections included in this genealogical data set.

The collections included in this genealogical data set.

Parameters

$collections
public Gedcomx\Records\Field[]
# getFields( )

The extracted fields included in this genealogical data set.

The extracted fields included in this genealogical data set.

Returns

Gedcomx\Records\Field[]
public
# setFields( Gedcomx\Records\Field[] $fields )

The extracted fields included in this genealogical data set.

The extracted fields included in this genealogical data set.

Parameters

$fields
public Gedcomx\Records\RecordDescriptor[]
# getRecordDescriptors( )

The record descriptors included in this genealogical data set.

The record descriptors included in this genealogical data set.

Returns

Gedcomx\Records\RecordDescriptor[]
public
# setRecordDescriptors( Gedcomx\Records\RecordDescriptor[] $recordDescriptors )

The record descriptors included in this genealogical data set.

The record descriptors included in this genealogical data set.

Parameters

$recordDescriptors
public array
# toArray( )

Returns the associative array for this Gedcomx

Returns the associative array for this Gedcomx

Returns

array

Overrides

Gedcomx\Links\HypermediaEnabledData::toArray
public
# initFromArray( array $o )

Initializes this Gedcomx from an associative array

Initializes this Gedcomx from an associative array

Parameters

$o

Overrides

Gedcomx\Links\HypermediaEnabledData::initFromArray
public
# accept( Gedcomx\Rt\GedcomxModelVisitor $visitor )

Accept a visitor.

Accept a visitor.

Parameters

$visitor
public
# toXml( XMLWriter $writer, boolean $includeNamespaces = true )

Writes this Gedcomx to an XML writer.

Writes this Gedcomx to an XML writer.

Parameters

$writer
The XML writer.
$includeNamespaces
Whether to write out the namespaces in the element.
public
# writeXmlContents( XMLWriter $writer )

Writes the contents of this Gedcomx to an XML writer. The startElement is expected to be already provided.

Writes the contents of this Gedcomx to an XML writer. The startElement is expected to be already provided.

Parameters

$writer
The XML writer.

Overrides

Gedcomx\Links\HypermediaEnabledData::writeXmlContents
public
# addPerson( Gedcomx\Conclusion\Person $person )

Add a person to the data set.

Add a person to the data set.

Parameters

$person
The person to be added.
public
# addSourceDescription( Gedcomx\Source\SourceDescription $sourceDescription )

Add a source description to the data set.

Add a source description to the data set.

Parameters

$sourceDescription
public
# addRelationship( Gedcomx\Conclusion\Relationship $relationship )

Add a relationship to the data set.

Add a relationship to the data set.

Parameters

$relationship
The relationship to be added.

Methods inherited from Gedcomx\Links\HypermediaEnabledData

addLink(), addLinkRelation(), addTemplatedLink(), getLink(), getLinks(), getLinksByRel(), setLinks()

Methods inherited from Gedcomx\Common\ExtensibleData

addExtensionElement(), findExtensionOfType(), findExtensionsOfType(), getExtensionElements(), getId(), initFromReader(), removeExtensionElements(), setExtensionElement(), setExtensionElements(), setId(), toJson()

Constants summary

string JSON_APPLICATION_TYPE
# 'application/json'
string HTML_TYPE
# 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
string FORM_DATA_TYPE
# 'application/x-www-form-urlencoded'
string XML_MEDIA_TYPE
# 'application/x-gedcomx-v1+xml'
string ATOM_XML_MEDIA_TYPE
# 'application/x-gedcomx-atom+json'
string JSON_MEDIA_TYPE
# 'application/x-gedcomx-v1+json'
string ATOM_JSON_MEDIA_TYPE
# 'application/x-gedcomx-atom+json'
string LD_JSON_TYPE
# 'application/ld+json'
string PLAIN_TEXT
# 'text/plain'
gedcomx-php API documentation generated by ApiGen