10 defined(
'JPATH_PLATFORM') or die;
27 protected $asFormat =
'xml';
35 protected $cache = array();
51 protected $from = array();
59 protected $options = null;
68 public function __construct()
70 $this->options =
new stdClass;
72 $this->cache = array(
'columns' => array(),
'keys' => array());
77 $this->withStructure();
93 public function __toString()
99 switch ($this->asFormat)
103 $buffer = $this->buildXml();
117 public function asXml()
119 $this->asFormat =
'xml';
132 abstract protected function buildXml();
142 abstract protected function buildXmlStructure();
152 abstract public function check();
164 public function from($from)
166 if (is_string($from))
168 $this->from = array($from);
170 elseif (is_array($from))
176 throw new Exception(
'JPLATFORM_ERROR_INPUT_REQUIRES_STRING_OR_ARRAY');
191 protected function getGenericTableName($table)
193 $prefix = $this->db->getPrefix();
196 $table = preg_replace(
"|^$prefix|",
'#__', $table);
226 public function withStructure($setting =
true)
228 $this->options->withStructure = (boolean) $setting;