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
e50b2762
Commit
e50b2762
authored
Oct 23, 2007
by
Jonathan.Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc. tweaks.
parent
a3c39fed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
15 deletions
+9
-15
Cli.php
lib/Doctrine/Cli.php
+0
-4
Export.php
lib/Doctrine/Data/Export.php
+1
-1
Schema.php
lib/Doctrine/Export/Schema.php
+4
-0
DumpData.php
lib/Doctrine/Task/DumpData.php
+4
-10
No files found.
lib/Doctrine/Cli.php
View file @
e50b2762
...
...
@@ -84,15 +84,11 @@ class Doctrine_Cli
*/
public
function
run
(
$args
)
{
echo
"
\n
"
;
try
{
$this
->
_run
(
$args
);
}
catch
(
Exception
$exception
)
{
$this
->
notifyException
(
$exception
);
}
echo
"
\n
"
;
}
protected
function
_getTaskClassFromArgs
(
$args
)
...
...
lib/Doctrine/Data/Export.php
View file @
e50b2762
...
...
@@ -110,7 +110,7 @@ class Doctrine_Data_Export extends Doctrine_Data
}
}
else
{
if
(
is_dir
(
$directory
))
{
throw
new
Doctrine_Data_Exception
(
'You must specify the path to a '
.
$format
.
' file to export. You specified a directory.'
)
;
$directory
.=
DIRECTORY_SEPARATOR
.
'data.'
.
$format
;
}
if
(
!
empty
(
$data
))
{
...
...
lib/Doctrine/Export/Schema.php
View file @
e50b2762
...
...
@@ -123,6 +123,10 @@ class Doctrine_Export_Schema
{
$array
=
$this
->
buildSchema
(
$directory
,
$models
);
if
(
is_dir
(
$schema
))
{
$schema
=
$schema
.
DIRECTORY_SEPARATOR
.
'schema.'
.
$format
;
}
return
Doctrine_Parser
::
dump
(
$array
,
$format
,
$schema
);
}
}
\ No newline at end of file
lib/Doctrine/Task/DumpData.php
View file @
e50b2762
...
...
@@ -35,25 +35,19 @@ class Doctrine_Task_DumpData extends Doctrine_Task
public
$description
=
'Dump data to a yaml data fixture file.'
,
$requiredArguments
=
array
(
'data_fixtures_path'
=>
'Specify path to write the yaml data fixtures file to.'
,
'models_path'
=>
'Specify path to your Doctrine_Record definitions.'
),
$optionalArguments
=
array
(
'individual_files'
=>
'Specify whether or not you want to dump to individual files. One file per model.'
);
$optionalArguments
=
array
();
public
function
execute
()
{
Doctrine
::
loadModels
(
$this
->
getArgument
(
'models_path'
));
$individualFiles
=
$this
->
getArgument
(
'individual_files'
)
?
true
:
false
;
$path
=
$this
->
getArgument
(
'data_fixtures_path'
);
if
(
!
$individualFiles
)
{
$e
=
explode
(
'.'
,
$this
->
getArgument
(
'data_fixtures_path'
));
if
(
end
(
$e
)
!==
'yml'
)
{
$path
=
$this
->
getArgument
(
'data_fixtures_path'
)
.
DIRECTORY_SEPARATOR
.
'data.yml'
;
}
if
(
is_array
(
$path
))
{
$path
=
$path
[
0
];
}
Doctrine
::
dumpData
(
$path
,
$individualFiles
);
Doctrine
::
dumpData
(
$path
);
$this
->
dispatcher
->
notify
(
sprintf
(
'Dumped data successfully to: %s'
,
$path
));
}
...
...
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