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
9d6e778a
Commit
9d6e778a
authored
Sep 12, 2008
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
further cleanup in configuration
parent
a502b130
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
36 deletions
+3
-36
Configuration.php
lib/Doctrine/Common/Configuration.php
+3
-36
No files found.
lib/Doctrine/Common/Configuration.php
View file @
9d6e778a
...
...
@@ -28,19 +28,16 @@
* It combines all configuration options from DBAL & ORM.
*
* INTERNAL: When adding a new configuration option just write a getter/setter
*
combination
and add the option to the _attributes array with a proper default value.
*
pair
and add the option to the _attributes array with a proper default value.
*
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
*/
class
Doctrine_Common_Configuration
{
private
$_nullObject
;
/**
* The attributes that are contained in the configuration.
* Values are default values. PHP null is replaced by a reference to the Null
* object on instantiation in order to use isset() instead of array_key_exists().
* Values are default values.
*
* @var array
*/
...
...
@@ -58,37 +55,7 @@ class Doctrine_Common_Configuration
* Creates a new configuration that can be used for Doctrine.
*/
public
function
__construct
()
{
$this
->
_nullObject
=
new
stdClass
();
$this
->
_initAttributes
();
}
/**
* Initializes the attributes.
* Changes null default values to references to the Null object to allow
* fast isset() checks instead of array_key_exists().
*
* @return void
*/
private
function
_initAttributes
()
{
foreach
(
$this
->
_attributes
as
$key
=>
$value
)
{
if
(
$value
===
null
)
{
$this
->
_attributes
[
$key
]
=
$this
->
_nullObject
;
}
}
}
/**
* Checks whether the configuration contains/supports an attribute.
*
* @param string $name
* @return boolean
*/
public
function
has
(
$name
)
{
return
isset
(
$this
->
_attributes
[
$name
]);
}
{}
public
function
getQuoteIdentifiers
()
{
...
...
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