mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Create basic structure of XML query
This commit is contained in:
parent
c97b161e42
commit
20025077f7
11 changed files with 303 additions and 8 deletions
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
namespace Rhymix\Framework\Parsers;
|
||||
|
||||
use Rhymix\Framework\Storage;
|
||||
|
||||
/**
|
||||
* DB table parser class for XE compatibility.
|
||||
*/
|
||||
|
|
@ -35,10 +33,6 @@ class DBTableParser
|
|||
*/
|
||||
public static function loadXML(string $filename)
|
||||
{
|
||||
// Initialize table definition.
|
||||
$table = new DBTable\Table;
|
||||
$table->name = preg_replace('/\.xml$/', '', basename($filename));
|
||||
|
||||
// Load the XML file.
|
||||
$xml = simplexml_load_string(file_get_contents($filename));
|
||||
if ($xml === false)
|
||||
|
|
@ -46,6 +40,10 @@ class DBTableParser
|
|||
return false;
|
||||
}
|
||||
|
||||
// Initialize table definition.
|
||||
$table = new DBTable\Table;
|
||||
$table->name = preg_replace('/\.xml$/', '', basename($filename));
|
||||
|
||||
// Load columns.
|
||||
foreach ($xml->column as $column_info)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue