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
e37ae458
Commit
e37ae458
authored
Sep 02, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
af2a8348
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
70 deletions
+27
-70
AuditLog.php
lib/Doctrine/AuditLog.php
+1
-64
Hydrate.php
lib/Doctrine/Hydrate.php
+1
-3
Plugin.php
lib/Doctrine/Plugin.php
+23
-1
Query.php
lib/Doctrine/Query.php
+2
-2
No files found.
lib/Doctrine/AuditLog.php
View file @
e37ae458
...
...
@@ -29,7 +29,7 @@
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class
Doctrine_AuditLog
class
Doctrine_AuditLog
extends
Doctrine_Plugin
{
protected
$_options
=
array
(
'className'
=>
'%CLASS%Version'
,
...
...
@@ -44,69 +44,6 @@ class Doctrine_AuditLog
{
$this
->
_options
=
array_merge
(
$this
->
_options
,
$options
);
}
/**
* __get
* an alias for getOption
*
* @param string $option
*/
public
function
__get
(
$option
)
{
if
(
isset
(
$this
->
options
[
$option
]))
{
return
$this
->
_options
[
$option
];
}
return
null
;
}
/**
* __isset
*
* @param string $option
*/
public
function
__isset
(
$option
)
{
return
isset
(
$this
->
_options
[
$option
]);
}
/**
* getOptions
* returns all options of this table and the associated values
*
* @return array all options and their values
*/
public
function
getOptions
()
{
return
$this
->
_options
;
}
/**
* setOption
* sets an option and returns this object in order to
* allow flexible method chaining
*
* @see slef::$_options for available options
* @param string $name the name of the option to set
* @param mixed $value the value of the option
* @return Doctrine_AuditLog this object
*/
public
function
setOption
(
$name
,
$value
)
{
if
(
!
isset
(
$this
->
_options
[
$name
]))
{
throw
new
Doctrine_Exception
(
'Unknown option '
.
$name
);
}
$this
->
_options
[
$name
]
=
$value
;
}
/**
* getOption
* returns the value of given option
*
* @param string $name the name of the option
* @return mixed the value of given option
*/
public
function
getOption
(
$name
)
{
if
(
isset
(
$this
->
_options
[
$name
]))
{
return
$this
->
_options
[
$name
];
}
return
null
;
}
public
function
getVersion
(
Doctrine_Record
$record
,
$version
)
{
...
...
lib/Doctrine/Hydrate.php
View file @
e37ae458
...
...
@@ -948,9 +948,7 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable
return
$collection
->
getFirst
();
}
case
self
::
HYDRATE_ARRAY
:
if
(
!
empty
(
$collection
[
0
]))
{
return
$collection
[
0
];
}
return
array_shift
(
$collection
);
}
return
false
;
...
...
lib/Doctrine/Plugin.php
View file @
e37ae458
...
...
@@ -36,6 +36,28 @@ class Doctrine_Plugin
* @var array $_options an array of plugin specific options
*/
protected
$_options
=
array
();
/**
* __get
* an alias for getOption
*
* @param string $option
*/
public
function
__get
(
$option
)
{
if
(
isset
(
$this
->
options
[
$option
]))
{
return
$this
->
_options
[
$option
];
}
return
null
;
}
/**
* __isset
*
* @param string $option
*/
public
function
__isset
(
$option
)
{
return
isset
(
$this
->
_options
[
$option
]);
}
/**
* returns the value of an option
*
...
...
@@ -74,6 +96,6 @@ class Doctrine_Plugin
*/
public
function
getOptions
()
{
return
$this
->
_options
;
return
$this
->
_options
;
}
}
lib/Doctrine/Query.php
View file @
e37ae458
...
...
@@ -1217,7 +1217,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
public
function
load
(
$path
,
$loadFields
=
true
)
{
$e
=
Doctrine_Tokenizer
::
quoteExplode
(
$path
,
'
MAP
'
);
$e
=
Doctrine_Tokenizer
::
quoteExplode
(
$path
,
'
INDEXBY
'
);
$mapWith
=
null
;
if
(
count
(
$e
)
>
1
)
{
...
...
@@ -1420,7 +1420,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
$table
=
$this
->
_aliasMap
[
$componentAlias
][
'table'
];
if
(
!
$table
->
hasColumn
(
$e
[
1
]))
{
throw
new
Doctrine_Query_Exception
(
"Couldn't use key mapping. Column "
.
$e
[
1
]
.
" does not exist."
);
throw
new
Doctrine_Query_Exception
(
"Couldn't use key mapping. Column "
.
$e
[
1
]
.
" does not exist."
);
}
$this
->
_aliasMap
[
$componentAlias
][
'map'
]
=
$table
->
getColumnName
(
$e
[
1
]);
...
...
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