You are here

public function EasyRdf_Graph::properties in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php \EasyRdf_Graph::properties()

Get a list of all the shortened property names (qnames) for a resource.

This method will return an empty array if the resource has no properties.

Return value

array Array of shortened URIs

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php, line 1192

Class

EasyRdf_Graph
Container for collection of EasyRdf_Resources.

Code

public function properties($resource) {
  $this
    ->checkResourceParam($resource);
  $properties = array();
  if (isset($this->index[$resource])) {
    foreach ($this->index[$resource] as $property => $value) {
      $short = EasyRdf_Namespace::shorten($property);
      if ($short) {
        $properties[] = $short;
      }
    }
  }
  return $properties;
}