Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
13d781cb
Commit
13d781cb
authored
Sep 13, 2007
by
Jonathan.Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added aliases.
parent
39c3f2e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
19 deletions
+22
-19
Xml.php
lib/Doctrine/Export/Schema/Xml.php
+1
-18
Yml.php
lib/Doctrine/Export/Schema/Yml.php
+1
-1
Parser.php
lib/Doctrine/Parser.php
+20
-0
No files found.
lib/Doctrine/Export/Schema/Xml.php
View file @
13d781cb
...
...
@@ -41,24 +41,7 @@ class Doctrine_Export_Schema_Xml extends Doctrine_Export_Schema
*/
public
function
build
(
$array
)
{
$xml
=
new
SimpleXMLElement
();
foreach
(
$array
as
$tableName
=>
$fields
)
{
$table
=
$xml
->
addChild
(
'table'
);
$name
=
$table
->
addChild
(
'name'
,
$tableName
);
$declaration
=
$table
->
addChild
(
'declaration'
);
foreach
(
$fields
as
$fieldName
=>
$properties
)
{
$field
=
$declaration
->
addChild
(
'field'
);
$field
->
addChild
(
'name'
,
$fieldName
);
foreach
(
$properties
as
$key
=>
$value
)
{
$field
->
addChild
(
$key
,
$value
);
}
}
}
return
$xml
->
asXml
();
return
Doctrime_Parser
::
dump
(
$array
,
null
,
'xml'
);
}
/**
...
...
lib/Doctrine/Export/Schema/Yml.php
View file @
13d781cb
...
...
@@ -41,7 +41,7 @@ class Doctrine_Export_Schema_Yml extends Doctrine_Export_Schema
*/
public
function
build
(
$array
)
{
return
var_dump
(
$array
);
return
Doctrime_Parser
::
dump
(
$array
,
null
,
'yml'
);
}
/**
...
...
lib/Doctrine/Parser.php
View file @
13d781cb
...
...
@@ -54,4 +54,24 @@ abstract class Doctrine_Parser
return
$parser
->
dumpData
(
$array
,
$path
);
}
static
public
function
loadXml
(
$path
)
{
return
self
::
load
(
$path
,
'xml'
);
}
static
public
function
dumpXml
(
$array
,
$path
=
null
)
{
return
self
::
dump
(
$array
,
$path
,
'xml'
);
}
static
public
function
loadYml
(
$path
)
{
return
self
::
load
(
$path
,
'yml'
);
}
static
public
function
dumpYml
(
$array
,
$path
=
null
)
{
return
self
::
dump
(
$array
,
$path
,
'yml'
);
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment