Ejemplo n.º 1
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');
// класс Person
class Person
{
    public $name;
    public $phone;
    function Person($name, $phone)
    {
        $this->name = $name;
        $this->phone = $phone;
    }
    function getName($val)
    {
        return $val;