ApiPlatform\SchemaGenerator\GoodRelationsBridge::extractCardinality PHP 메소드

extractCardinality() 공개 메소드

Extracts cardinality from the Good Relations OWL.
public extractCardinality ( string $id ) : string | boolean
$id string
리턴 string | boolean
    public function extractCardinality($id)
    {
        foreach ($this->relations as $relation) {
            $result = $relation->xpath(sprintf('//*[@rdf:about="%s"]/rdfs:label', $this->getPropertyUrl($id)));
            if (count($result)) {
                preg_match('/\\(.\\.\\..\\)/', $result[0]->asXML(), $matches);
                return $matches[0];
            }
        }
        return false;
    }