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
bea129db
Commit
bea129db
authored
Oct 24, 2007
by
Jonathan.Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for packages to the doctrine builder and yaml schema.
parent
094e6cb3
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
241 additions
and
64 deletions
+241
-64
Builder.php
lib/Doctrine/Import/Builder.php
+237
-59
Schema.php
lib/Doctrine/Import/Schema.php
+4
-5
No files found.
lib/Doctrine/Import/Builder.php
View file @
bea129db
This diff is collapsed.
Click to expand it.
lib/Doctrine/Import/Schema.php
View file @
bea129db
...
...
@@ -121,7 +121,7 @@ class Doctrine_Import_Schema
continue
;
}
$options
=
$this
->
getOptions
(
$properties
,
$directory
);
$options
=
$this
->
getOptions
(
$properties
);
$columns
=
$this
->
getColumns
(
$properties
);
$relations
=
$this
->
getRelations
(
$properties
);
$indexes
=
$this
->
getIndexes
(
$properties
);
...
...
@@ -136,20 +136,18 @@ class Doctrine_Import_Schema
/**
* getOptions
*
* FIXME: Directory argument needs to be removed
*
* @param string $properties Array of table properties
* @param string $directory Directory we are writing the class to
* @return array $options Array of options from a parse schemas properties
*/
public
function
getOptions
(
$properties
,
$directory
)
public
function
getOptions
(
$properties
)
{
$options
=
array
();
$options
[
'className'
]
=
$properties
[
'className'
];
$options
[
'fileName'
]
=
$directory
.
DIRECTORY_SEPARATOR
.
$properties
[
'className'
]
.
'.class.php'
;
$options
[
'tableName'
]
=
isset
(
$properties
[
'tableName'
])
?
$properties
[
'tableName'
]
:
null
;
$options
[
'connection'
]
=
isset
(
$properties
[
'connection'
])
?
$properties
[
'connection'
]
:
null
;
$options
[
'connectionClassName'
]
=
isset
(
$properties
[
'connection'
])
?
$properties
[
'className'
]
:
null
;
$options
[
'package'
]
=
$properties
[
'package'
];
if
(
isset
(
$properties
[
'inheritance'
]))
{
$options
[
'inheritance'
]
=
$properties
[
'inheritance'
];
...
...
@@ -290,6 +288,7 @@ class Doctrine_Import_Schema
$build
[
$className
][
'attributes'
]
=
isset
(
$table
[
'attributes'
])
?
$table
[
'attributes'
]
:
array
();
$build
[
$className
][
'templates'
]
=
isset
(
$table
[
'templates'
])
?
$table
[
'templates'
]
:
array
();
$build
[
$className
][
'actAs'
]
=
isset
(
$table
[
'actAs'
])
?
$table
[
'actAs'
]
:
array
();
$build
[
$className
][
'package'
]
=
isset
(
$table
[
'package'
])
?
$table
[
'package'
]
:
null
;
}
if
(
isset
(
$table
[
'inheritance'
]))
{
...
...
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