Skip to content

Commit

Permalink
Merge pull request #1 from moustaki/master
Browse files Browse the repository at this point in the history
Generating specs on command-line
  • Loading branch information
njh committed Apr 6, 2013
2 parents 66d52c8 + a19f7b5 commit 0029012
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions phpspecgen.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,18 @@ public function htmlTerms($type, $title) {

<?php

$options = getopt('u:');
if (!empty($_REQUEST['uri'])) {
$uri = $_REQUEST['uri'];
} elseif(array_key_exists('u', $options)) {
$uri = $options['u'];
}

if (!empty($uri)) {

// Parse the document
$graph = new EasyRdf_Graph($_REQUEST['uri']);
$graph->load($_REQUEST['uri']);
$graph = new EasyRdf_Graph($uri);
$graph->load($uri);

// Get the first ontology in the document
$vocab = $graph->get('owl:Ontology', '^rdf:type');
Expand Down

0 comments on commit 0029012

Please sign in to comment.