<?php
class Catalog extends Table {
private $type;
private $desc;
protected $prot;
public $pub;
protected function getMetods() {
$vars = get_object_vars($this->self);
return array_keys($vars);
}
}
abstract class Table {
public $perPub;
protected $perProt;
private $perPriv;
protected $self;
abstract protected function getMetods();
public function __toString() {
return implode(', ', $this->getMetods());
}
}
$o=new Catalog();
echo (string) $o;