PHP Class ApiPlatform\SchemaGenerator\GoodRelationsBridge

Author: Kévin Dunglas ([email protected])
Show file Open project: api-platform/schema-generator Class Usage Examples

Protected Properties

Property Type Description
$datatypePropertiesTable array
$objectPropertiesTable array
$relations SimpleXMLElement[]

Public Methods

Method Description
__construct ( array $relations )
exist ( string $id ) : boolean Checks if a property exists in GoodRelations.
extractCardinality ( string $id ) : string | boolean Extracts cardinality from the Good Relations OWL.

Private Methods

Method Description
convertPropertyId ( string $id ) : string Converts Schema.org's id to Good Relations id.
getPropertyUrl ( string $id ) : string Gets a property URL.

Method Details

__construct() public method

public __construct ( array $relations )
$relations array

exist() public method

Checks if a property exists in GoodRelations.
public exist ( string $id ) : boolean
$id string
return boolean

extractCardinality() public method

Extracts cardinality from the Good Relations OWL.
public extractCardinality ( string $id ) : string | boolean
$id string
return string | boolean

Property Details

$datatypePropertiesTable protected static property

protected static array $datatypePropertiesTable
return array

$objectPropertiesTable protected static property

protected static array $objectPropertiesTable
return array

$relations protected property

protected SimpleXMLElement[] $relations
return SimpleXMLElement[]