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
98cf9017
Commit
98cf9017
authored
Oct 08, 2009
by
jwage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0][DDC-35] Fixing accidental rename of file
parent
a3c09d4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
ConvertMappingTask.php
lib/Doctrine/ORM/Tools/Cli/Tasks/ConvertMappingTask.php
+14
-6
No files found.
lib/Doctrine/ORM/Tools/Cli/Tasks/MappingTask.php
→
lib/Doctrine/ORM/Tools/Cli/Tasks/
Convert
MappingTask.php
View file @
98cf9017
...
...
@@ -57,10 +57,12 @@ class ConvertMappingTask extends AbstractTask
$printer
->
writeln
(
'Description: Convert mapping information between supported formats.'
)
->
writeln
(
'Options:'
)
->
write
(
'--from=<PATH>'
,
'REQ_ARG'
)
->
writeln
(
"
\t
The path to the mapping information you are converting from."
)
->
write
(
'--from=<SOURCE>'
,
'REQ_ARG'
)
->
writeln
(
"
\t
The path to the mapping information to convert from (yml, xml, php, annotation)."
)
->
write
(
'--from-database'
,
'REQ_ARG'
)
->
writeln
(
"
\t
Use this option if you wish to reverse engineer your database to a set of Doctrine mapping files."
)
->
write
(
'--to=<TYPE>'
,
'REQ_ARG'
)
->
writeln
(
"
\t
The format to convert to."
)
->
writeln
(
"
\t
The format to convert to
(yml, xml, php, annotation)
."
)
->
write
(
PHP_EOL
)
->
write
(
'--dest=<PATH>'
,
'REQ_ARG'
)
->
writeln
(
"
\t
The path to write the converted mapping information."
);
...
...
@@ -77,9 +79,10 @@ class ConvertMappingTask extends AbstractTask
private
function
_writeSynopsis
(
$printer
)
{
$printer
->
write
(
'convert-mapping'
,
'KEYWORD'
)
->
write
(
' --from=<
PATH
>'
,
'REQ_ARG'
)
->
write
(
' --from=<
SOURCE
>'
,
'REQ_ARG'
)
->
write
(
' --to=<TYPE>'
,
'REQ_ARG'
)
->
writeln
(
' --dest=<PATH>'
,
'REQ_ARG'
);
->
write
(
' --dest=<PATH>'
,
'REQ_ARG'
)
->
writeln
(
' --from-database'
,
'OPT_ARG'
);
}
/**
...
...
@@ -94,8 +97,13 @@ class ConvertMappingTask extends AbstractTask
$args
=
$this
->
getArguments
();
$printer
=
$this
->
getPrinter
();
if
(
array_key_exists
(
'from-database'
,
$args
))
{
$args
[
'from'
][
0
]
=
'database'
;
$this
->
setArguments
(
$args
);
}
if
(
!
(
isset
(
$args
[
'from'
])
&&
isset
(
$args
[
'to'
])
&&
isset
(
$args
[
'dest'
])))
{
$printer
->
writeln
(
'You must include a value for all
four
options: --from, --to and --dest'
,
'ERROR'
);
$printer
->
writeln
(
'You must include a value for all
three
options: --from, --to and --dest'
,
'ERROR'
);
return
false
;
}
if
(
$args
[
'to'
]
!=
'annotation'
&&
isset
(
$args
[
'extend'
]))
{
...
...
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