/** * Get TableDescriptor Singleton instance * * @return TableDescriptor * @author Wilker **/ public static function get_instance() { if (!self::$instance) { self::$instance = new TableDescriptor(); } return self::$instance; }
public function fields() { $descriptor = TableDescriptor::get_instance(); $table = $this->table(); return $descriptor->{$table}; }