Ejemplo n.º 1
0
<?php

//require_once 'editor/edt.html';
//exit;
require_once 'www/StoreRDF.php';
require_once 'PHPTAL.php';
$store = new StoreRDF();
//$store->test();
//$store->setObject('http://www.example.com/People/II/contact#me', 'foaf:homepage', 'http://www.example.com/People/II');
//exit;
$subj = $store->subjects('a', 'foaf:Person')[0];
//$q = getSubjects('foaf:Person', $store);
//$subj = $q[0];
/*foreach ($q as $row) {
    //$r .= '<li>' . $row['obj'] . ' - ' . $row['rel'] . ' - ' . $row['subj'] . '</li>';
    if ($rows = $row->getTempl()){
      foreach ($rows as $name) {
        $r .= '<li>' . $name . '</li>';
      }
    }
    if ($rows = $row->getObj('?rel')){
      foreach ($rows as $name) {
        $r .= '<li>' . $name . '</li>';
      }
    }
  }*/
// создать обработчик шаблонов
$template = new PHPTAL();
$template->setSource($store->getTempl('foaf:Person'));
$editortmpl = new PHPTAL('./editor/index.html');
//$template = new PHPTAL('/home/paskal/public/mytests/www/templ_.html');