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
d099c2e3
Commit
d099c2e3
authored
Nov 01, 2007
by
Jonathan.Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes extenstion to .php instead of .class.php to be consistant with all of Doctrine.
parent
6f07c2b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
4 deletions
+32
-4
Import.php
lib/Doctrine/Import.php
+2
-2
Builder.php
lib/Doctrine/Import/Builder.php
+29
-1
Schema.php
lib/Doctrine/Import/Schema.php
+1
-1
No files found.
lib/Doctrine/Import.php
View file @
d099c2e3
...
...
@@ -196,7 +196,7 @@ class Doctrine_Import extends Doctrine_Connection_Module
* @param array $databases
* @return array the names of the imported classes
*/
public
function
importSchema
(
$directory
,
array
$databases
=
array
())
public
function
importSchema
(
$directory
,
array
$databases
=
array
()
,
array
$options
=
array
()
)
{
$connections
=
Doctrine_Manager
::
getInstance
()
->
getConnections
();
...
...
@@ -208,8 +208,8 @@ class Doctrine_Import extends Doctrine_Connection_Module
}
$builder
=
new
Doctrine_Import_Builder
();
$builder
->
generateBaseClasses
(
true
);
$builder
->
setTargetPath
(
$directory
);
$builder
->
setOptions
(
$options
);
$classes
=
array
();
foreach
(
$connection
->
import
->
listTables
()
as
$table
)
{
...
...
lib/Doctrine/Import/Builder.php
View file @
d099c2e3
...
...
@@ -68,7 +68,7 @@ class Doctrine_Import_Builder
*
* @var string $suffix
*/
protected
$_suffix
=
'.
class.
php'
;
protected
$_suffix
=
'.php'
;
/**
* generateBaseClasses
...
...
@@ -235,6 +235,34 @@ class Doctrine_Import_Builder
return
$this
->
_path
;
}
/**
* setOptions
*
* @param string $options
* @return void
*/
public
function
setOptions
(
$options
)
{
if
(
!
empty
(
$options
))
{
foreach
(
$options
as
$key
=>
$value
)
{
$this
->
setOption
(
$key
,
$value
);
}
}
}
/**
* setOption
*
* @param string $key
* @param string $value
* @return void
*/
public
function
setOption
(
$key
,
$value
)
{
$name
=
'_'
.
$key
;
$this
->
$name
=
$value
;
}
/**
* loadTemplate
*
...
...
lib/Doctrine/Import/Schema.php
View file @
d099c2e3
...
...
@@ -46,7 +46,7 @@ class Doctrine_Import_Schema
'generateTableClasses'
=>
true
,
'baseClassesDirectory'
=>
'generated'
,
'baseClassName'
=>
'Doctrine_Record'
,
'suffix'
=>
'.
class.
php'
);
'suffix'
=>
'.php'
);
/**
* getOption
...
...
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