public function 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

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php, line 1168

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