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
de07b6a3
Commit
de07b6a3
authored
Nov 11, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dependency and strict standard fixes
parent
30a2b0ea
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
69 additions
and
45 deletions
+69
-45
Access.php
lib/Doctrine/Access.php
+14
-3
Common.php
lib/Doctrine/Connection/Common.php
+1
-0
Profiler.php
lib/Doctrine/Db/Profiler.php
+1
-0
AccessorInvoker.php
lib/Doctrine/EventListener/AccessorInvoker.php
+1
-1
Chain.php
lib/Doctrine/EventListener/Chain.php
+2
-0
Sqlite.php
lib/Doctrine/Export/Sqlite.php
+1
-1
Mssql.php
lib/Doctrine/Expression/Mssql.php
+1
-1
Oracle.php
lib/Doctrine/Expression/Oracle.php
+1
-1
Pgsql.php
lib/Doctrine/Expression/Pgsql.php
+2
-1
Sqlite.php
lib/Doctrine/Expression/Sqlite.php
+1
-1
BaseClass.php
lib/Doctrine/Import/Builder/BaseClass.php
+1
-1
Db.php
lib/Doctrine/Import/Reader/Db.php
+1
-1
Propel.php
lib/Doctrine/Import/Reader/Propel.php
+2
-2
Association.php
lib/Doctrine/Relation/Association.php
+1
-0
Self.php
lib/Doctrine/Relation/Association/Self.php
+34
-27
Column.php
lib/Doctrine/Schema/Column.php
+1
-1
Database.php
lib/Doctrine/Schema/Database.php
+2
-2
Relation.php
lib/Doctrine/Schema/Relation.php
+1
-1
Table.php
lib/Doctrine/Schema/Table.php
+1
-1
No files found.
lib/Doctrine/Access.php
View file @
de07b6a3
...
...
@@ -31,7 +31,9 @@
abstract
class
Doctrine_Access
implements
ArrayAccess
{
/**
* setArray
*
* @param array $array an array of key => value pairs
* @since 1.0
* @return Doctrine_Access
*/
public
function
setArray
(
array
$array
)
{
...
...
@@ -42,18 +44,23 @@ abstract class Doctrine_Access implements ArrayAccess {
return
$this
;
}
/**
* __set -- an alias of set()
* __set an alias of set()
*
* @see set, offsetSet
* @param $name
* @param $value
* @since 1.0
* @return void
*/
public
function
__set
(
$name
,
$value
)
{
$this
->
set
(
$name
,
$value
);
}
/**
* __get -- an alias of get()
*
* @see get, offsetGet
* @param mixed $name
* @since 1.0
* @return mixed
*/
public
function
__get
(
$name
)
{
...
...
@@ -63,6 +70,8 @@ abstract class Doctrine_Access implements ArrayAccess {
* __isset()
*
* @param string $name
* @since 1.0
* @return boolean whether or not this object contains $name
*/
public
function
__isset
(
$name
)
{
return
$this
->
contains
(
$name
);
...
...
@@ -71,19 +80,21 @@ abstract class Doctrine_Access implements ArrayAccess {
* __unset()
*
* @param string $name
* @since 1.0
* @return void
*/
public
function
__unset
(
$name
)
{
return
$this
->
remove
(
$name
);
}
/**
* @param mixed $offset
* @return boolean
-- whether or not the data has a field
$offset
* @return boolean
whether or not this object contains
$offset
*/
public
function
offsetExists
(
$offset
)
{
return
$this
->
contains
(
$offset
);
}
/**
* offsetGet
--
an alias of get()
* offsetGet
an alias of get()
* @see get, __get
* @param mixed $offset
* @return mixed
...
...
lib/Doctrine/Connection/Common.php
View file @
de07b6a3
<?php
Doctrine
::
autoload
(
'Doctrine_Connection'
);
/**
* standard connection, the parent of pgsql, mysql and sqlite
*/
...
...
lib/Doctrine/Db/Profiler.php
View file @
de07b6a3
...
...
@@ -18,6 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Overloadable'
);
/**
* Doctrine_Db_Profiler
*
...
...
lib/Doctrine/EventListener/AccessorInvoker.php
View file @
de07b6a3
...
...
@@ -18,7 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_EventListener'
);
/**
* Doctrine_EventListener_AccessorInvoker
*
...
...
lib/Doctrine/EventListener/Chain.php
View file @
de07b6a3
...
...
@@ -19,6 +19,8 @@
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Access'
);
Doctrine
::
autoload
(
'Doctrine_EventListener_Interface'
);
/**
* Doctrine_EventListener_Chain
* this class represents a chain of different listeners,
...
...
lib/Doctrine/Export/Sqlite.php
View file @
de07b6a3
...
...
@@ -60,7 +60,7 @@ class Doctrine_Export_Sqlite extends Doctrine_Export {
* @throws PDOException
* @return void
*/
public
function
createIndex
(
$table
,
$name
,
$definition
)
{
public
function
createIndex
(
$table
,
$name
,
array
$definition
)
{
$table
=
$this
->
conn
->
quoteIdentifier
(
$table
,
true
);
$name
=
$this
->
dbh
->
getIndexName
(
$name
);
$query
=
"CREATE INDEX
$name
ON
$table
"
;
...
...
lib/Doctrine/Expression/Mssql.php
View file @
de07b6a3
...
...
@@ -51,7 +51,7 @@ class Doctrine_Expression_Mssql extends Doctrine_Expression {
*
* @return string to call a function to get a substring
*/
public
function
substring
(
$value
,
$position
=
1
,
$length
=
null
)
{
public
function
substring
(
$value
,
$position
,
$length
=
null
)
{
if
(
!
is_null
(
$length
))
return
"SUBSTRING(
$value
,
$position
,
$length
)"
;
...
...
lib/Doctrine/Expression/Oracle.php
View file @
de07b6a3
...
...
@@ -52,7 +52,7 @@ class Doctrine_Expression_Oracle extends Doctrine_Expression {
* @param integer $length the substring portion length
* @return string SQL substring function with given parameters
*/
public
function
substring
(
$value
,
$position
=
1
,
$length
=
null
)
{
public
function
substring
(
$value
,
$position
,
$length
=
null
)
{
if
(
$length
!==
null
)
return
"SUBSTR(
$value
,
$position
,
$length
)"
;
...
...
lib/Doctrine/Expression/Pgsql.php
View file @
de07b6a3
<?php
/*
* $Id$
*
...
...
@@ -63,7 +64,7 @@ class Doctrine_Expression_Pgsql extends Doctrine_Expression {
* @param int $len extract this amount of characters.
* @return string sql that extracts part of a string.
*/
public
function
sub
S
tring
(
$value
,
$from
,
$len
=
null
)
{
public
function
sub
s
tring
(
$value
,
$from
,
$len
=
null
)
{
$value
=
$this
->
getIdentifier
(
$value
);
if
(
$len
===
null
)
{
...
...
lib/Doctrine/Expression/Sqlite.php
View file @
de07b6a3
...
...
@@ -98,7 +98,7 @@ class Doctrine_Expression_Sqlite extends Doctrine_Expression {
* @param integer $length the substring portion length
* @return string SQL substring function with given parameters
*/
public
function
substring
(
$value
,
$position
=
1
,
$length
=
null
)
{
public
function
substring
(
$value
,
$position
,
$length
=
null
)
{
if
(
$length
!==
null
)
return
'SUBSTR('
.
$value
.
', '
.
$position
.
', '
.
$length
.
')'
;
...
...
lib/Doctrine/Import/Builder/BaseClass.php
View file @
de07b6a3
...
...
@@ -18,7 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Import_Builder'
);
/**
* @package Doctrine
* @url http://www.phpdoctrine.com
...
...
lib/Doctrine/Import/Reader/Db.php
View file @
de07b6a3
...
...
@@ -18,7 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Import_Reader'
);
/**
* @package Doctrine
* @url http://www.phpdoctrine.com
...
...
lib/Doctrine/Import/Reader/Propel.php
View file @
de07b6a3
...
...
@@ -18,7 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Import_Reader'
);
/**
* @package Doctrine
* @url http://www.phpdoctrine.com
...
...
@@ -56,7 +56,7 @@ class Doctrine_Import_Reader_Xml_Propel extends Doctrine_Import_Reader
}
// end of member function setXml
public
function
read
()
{
}
...
...
lib/Doctrine/Relation/Association.php
View file @
de07b6a3
...
...
@@ -18,6 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Relation'
);
/**
* Doctrine_Relation_Association this class takes care of association mapping
* (= many-to-many relationships, where the relationship is handled with an additional relational table
...
...
lib/Doctrine/Relation/Association/Self.php
View file @
de07b6a3
<?php
<?php
/*
* $Id$
*
...
...
@@ -18,7 +18,14 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Relation_Association'
);
/**
* Doctrine_Relation_Association_Self
*
* @package Doctrine ORM
* @url www.phpdoctrine.com
* @license LGPL
*/
class
Doctrine_Relation_Association_Self
extends
Doctrine_Relation_Association
{
/**
* getRelationDql
...
...
@@ -28,26 +35,26 @@ class Doctrine_Relation_Association_Self extends Doctrine_Relation_Association {
*/
public
function
getRelationDql
(
$count
,
$context
=
'record'
)
{
switch
(
$context
)
:
case
"record"
:
$sub
=
"SELECT "
.
$this
->
foreign
.
" FROM "
.
$this
->
associationTable
->
getTableName
()
.
" WHERE "
.
$this
->
local
.
" = ?"
;
$sub2
=
"SELECT "
.
$this
->
local
.
" FROM "
.
$this
->
associationTable
->
getTableName
()
.
" WHERE "
.
$this
->
foreign
.
" = ?"
;
case
'record'
:
$sub
=
'SELECT '
.
$this
->
foreign
.
' FROM '
.
$this
->
associationTable
->
getTableName
()
.
' WHERE '
.
$this
->
local
.
' = ?'
;
$sub2
=
'SELECT '
.
$this
->
local
.
' FROM '
.
$this
->
associationTable
->
getTableName
()
.
' WHERE '
.
$this
->
foreign
.
' = ?'
;
$dql
=
"FROM "
.
$this
->
table
->
getComponentName
();
$dql
.=
"."
.
$this
->
associationTable
->
getComponentName
();
$dql
.=
" WHERE "
.
$this
->
table
->
getComponentName
()
.
"."
.
$this
->
table
->
getIdentifier
()
.
" IN (
$sub
)"
;
$dql
.=
" || "
.
$this
->
table
->
getComponentName
()
.
"."
.
$this
->
table
->
getIdentifier
()
.
" IN (
$sub2
)"
;
$dql
=
'FROM '
.
$this
->
table
->
getComponentName
();
$dql
.=
'.'
.
$this
->
associationTable
->
getComponentName
();
$dql
.=
' WHERE '
.
$this
->
table
->
getComponentName
()
.
'.'
.
$this
->
table
->
getIdentifier
()
.
' IN ('
.
$sub
.
')'
;
$dql
.=
' || '
.
$this
->
table
->
getComponentName
()
.
'.'
.
$this
->
table
->
getIdentifier
()
.
' IN ('
.
$sub2
.
')'
;
break
;
case
"collection"
:
$sub
=
substr
(
str_repeat
(
"?, "
,
$count
),
0
,
-
2
);
$dql
=
"FROM "
.
$this
->
associationTable
->
getComponentName
()
.
"."
.
$this
->
table
->
getComponentName
();
$dql
.=
" WHERE "
.
$this
->
associationTable
->
getComponentName
()
.
"."
.
$this
->
local
.
" IN (
$sub
)"
;
case
'collection'
:
$sub
=
substr
(
str_repeat
(
'?, '
,
$count
),
0
,
-
2
);
$dql
=
'FROM '
.
$this
->
associationTable
->
getComponentName
()
.
'.'
.
$this
->
table
->
getComponentName
();
$dql
.=
' WHERE '
.
$this
->
associationTable
->
getComponentName
()
.
'.'
.
$this
->
local
.
' IN ('
.
$sub
.
')'
;
endswitch
;
return
$dql
;
...
...
@@ -63,15 +70,15 @@ class Doctrine_Relation_Association_Self extends Doctrine_Relation_Association {
$tableName
=
$record
->
getTable
()
->
getTableName
();
$identifier
=
$record
->
getTable
()
->
getIdentifier
();
$sub
=
"SELECT "
.
$this
->
getForeign
()
.
" FROM "
.
$assocTable
.
" WHERE "
.
$this
->
getLocal
()
.
" = ?"
;
$sub
=
'SELECT '
.
$this
->
getForeign
()
.
' FROM '
.
$assocTable
.
' WHERE '
.
$this
->
getLocal
()
.
' = ?'
;
$sub2
=
"SELECT "
.
$this
->
getLocal
()
.
" FROM "
.
$assocTable
.
" WHERE "
.
$this
->
getForeign
()
.
" = ?"
;
$sub2
=
'SELECT '
.
$this
->
getLocal
()
.
' FROM '
.
$assocTable
.
' WHERE '
.
$this
->
getForeign
()
.
' = ?'
;
$q
->
select
(
'{'
.
$tableName
.
'.*}, {'
.
$assocTable
.
'.*}'
)
->
from
(
$tableName
.
' INNER JOIN '
.
$assocTable
.
' ON '
.
...
...
lib/Doctrine/Schema/Column.php
View file @
de07b6a3
...
...
@@ -18,7 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Schema_Object'
);
/**
* @package Doctrine
* @url http://www.phpdoctrine.com
...
...
lib/Doctrine/Schema/Database.php
View file @
de07b6a3
...
...
@@ -18,7 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Schema_Object'
);
/**
* @package Doctrine
* @url http://www.phpdoctrine.com
...
...
@@ -45,7 +45,7 @@ class Doctrine_Schema_Database extends Doctrine_Schema_Object {
/**
*
* @return
* @return
* @access public
*/
public
function
__clone
(
)
{
...
...
lib/Doctrine/Schema/Relation.php
View file @
de07b6a3
...
...
@@ -18,7 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Schema_Object'
);
/**
* @package Doctrine
* @url http://www.phpdoctrine.com
...
...
lib/Doctrine/Schema/Table.php
View file @
de07b6a3
...
...
@@ -18,7 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Schema_Object'
);
/**
* @package Doctrine
* @url http://www.phpdoctrine.com
...
...
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