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
1cbadb3e
Unverified
Commit
1cbadb3e
authored
Oct 01, 2018
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed leading underscore from private class memeber names
parent
64939c35
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
286 additions
and
286 deletions
+286
-286
Connection.php
lib/Doctrine/DBAL/Connection.php
+66
-66
DB2Connection.php
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php
+17
-17
DB2Statement.php
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
+26
-26
MysqliConnection.php
lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
+27
-27
ConnectionEventArgs.php
lib/Doctrine/DBAL/Event/ConnectionEventArgs.php
+6
-6
MysqlSessionInit.php
lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
+6
-6
SchemaAlterTableAddColumnEventArgs.php
...octrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php
+13
-13
SchemaAlterTableChangeColumnEventArgs.php
...rine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php
+13
-13
SchemaAlterTableEventArgs.php
lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php
+10
-10
SchemaAlterTableRemoveColumnEventArgs.php
...rine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php
+13
-13
SchemaAlterTableRenameColumnEventArgs.php
...rine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php
+16
-16
SchemaColumnDefinitionEventArgs.php
lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php
+16
-16
SchemaCreateTableColumnEventArgs.php
lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php
+13
-13
SchemaCreateTableEventArgs.php
lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php
+16
-16
SchemaDropTableEventArgs.php
lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php
+9
-9
SchemaEventArgs.php
lib/Doctrine/DBAL/Event/SchemaEventArgs.php
+3
-3
SchemaIndexDefinitionEventArgs.php
lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php
+13
-13
View.php
lib/Doctrine/DBAL/Schema/View.php
+3
-3
No files found.
lib/Doctrine/DBAL/Connection.php
View file @
1cbadb3e
This diff is collapsed.
Click to expand it.
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php
View file @
1cbadb3e
...
...
@@ -27,7 +27,7 @@ use function func_get_args;
class
DB2Connection
implements
Connection
,
ServerInfoAwareConnection
{
/** @var resource */
private
$
_
conn
=
null
;
private
$conn
=
null
;
/**
* @param mixed[] $params
...
...
@@ -42,11 +42,11 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
$isPersistent
=
(
isset
(
$params
[
'persistent'
])
&&
$params
[
'persistent'
]
===
true
);
if
(
$isPersistent
)
{
$this
->
_
conn
=
db2_pconnect
(
$params
[
'dbname'
],
$username
,
$password
,
$driverOptions
);
$this
->
conn
=
db2_pconnect
(
$params
[
'dbname'
],
$username
,
$password
,
$driverOptions
);
}
else
{
$this
->
_
conn
=
db2_connect
(
$params
[
'dbname'
],
$username
,
$password
,
$driverOptions
);
$this
->
conn
=
db2_connect
(
$params
[
'dbname'
],
$username
,
$password
,
$driverOptions
);
}
if
(
!
$this
->
_
conn
)
{
if
(
!
$this
->
conn
)
{
throw
new
DB2Exception
(
db2_conn_errormsg
());
}
}
...
...
@@ -57,7 +57,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
public
function
getServerVersion
()
{
/** @var stdClass $serverInfo */
$serverInfo
=
db2_server_info
(
$this
->
_
conn
);
$serverInfo
=
db2_server_info
(
$this
->
conn
);
return
$serverInfo
->
DBMS_VER
;
}
...
...
@@ -75,7 +75,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/
public
function
prepare
(
$sql
)
{
$stmt
=
@
db2_prepare
(
$this
->
_
conn
,
$sql
);
$stmt
=
@
db2_prepare
(
$this
->
conn
,
$sql
);
if
(
!
$stmt
)
{
throw
new
DB2Exception
(
db2_stmt_errormsg
());
}
...
...
@@ -115,7 +115,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/
public
function
exec
(
$statement
)
{
$stmt
=
@
db2_exec
(
$this
->
_
conn
,
$statement
);
$stmt
=
@
db2_exec
(
$this
->
conn
,
$statement
);
if
(
$stmt
===
false
)
{
throw
new
DB2Exception
(
db2_stmt_errormsg
());
...
...
@@ -129,7 +129,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/
public
function
lastInsertId
(
$name
=
null
)
{
return
db2_last_insert_id
(
$this
->
_
conn
);
return
db2_last_insert_id
(
$this
->
conn
);
}
/**
...
...
@@ -137,7 +137,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/
public
function
beginTransaction
()
{
db2_autocommit
(
$this
->
_
conn
,
DB2_AUTOCOMMIT_OFF
);
db2_autocommit
(
$this
->
conn
,
DB2_AUTOCOMMIT_OFF
);
}
/**
...
...
@@ -145,10 +145,10 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/
public
function
commit
()
{
if
(
!
db2_commit
(
$this
->
_
conn
))
{
throw
new
DB2Exception
(
db2_conn_errormsg
(
$this
->
_
conn
));
if
(
!
db2_commit
(
$this
->
conn
))
{
throw
new
DB2Exception
(
db2_conn_errormsg
(
$this
->
conn
));
}
db2_autocommit
(
$this
->
_
conn
,
DB2_AUTOCOMMIT_ON
);
db2_autocommit
(
$this
->
conn
,
DB2_AUTOCOMMIT_ON
);
}
/**
...
...
@@ -156,10 +156,10 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/
public
function
rollBack
()
{
if
(
!
db2_rollback
(
$this
->
_
conn
))
{
throw
new
DB2Exception
(
db2_conn_errormsg
(
$this
->
_
conn
));
if
(
!
db2_rollback
(
$this
->
conn
))
{
throw
new
DB2Exception
(
db2_conn_errormsg
(
$this
->
conn
));
}
db2_autocommit
(
$this
->
_
conn
,
DB2_AUTOCOMMIT_ON
);
db2_autocommit
(
$this
->
conn
,
DB2_AUTOCOMMIT_ON
);
}
/**
...
...
@@ -167,7 +167,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/
public
function
errorCode
()
{
return
db2_conn_error
(
$this
->
_
conn
);
return
db2_conn_error
(
$this
->
conn
);
}
/**
...
...
@@ -176,7 +176,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
public
function
errorInfo
()
{
return
[
0
=>
db2_conn_errormsg
(
$this
->
_
conn
),
0
=>
db2_conn_errormsg
(
$this
->
conn
),
1
=>
$this
->
errorCode
(),
];
}
...
...
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
View file @
1cbadb3e
...
...
@@ -40,10 +40,10 @@ use function strtolower;
class
DB2Statement
implements
IteratorAggregate
,
Statement
{
/** @var resource */
private
$
_
stmt
;
private
$stmt
;
/** @var mixed[] */
private
$
_
bindParam
=
[];
private
$bindParam
=
[];
/** @var string Name of the default class to instantiate when fetching class instances. */
private
$defaultFetchClass
=
'\stdClass'
;
...
...
@@ -52,7 +52,7 @@ class DB2Statement implements IteratorAggregate, Statement
private
$defaultFetchClassCtorArgs
=
[];
/** @var int */
private
$
_
defaultFetchMode
=
FetchMode
::
MIXED
;
private
$defaultFetchMode
=
FetchMode
::
MIXED
;
/**
* Indicates whether the statement is in the state when fetching results is possible
...
...
@@ -66,7 +66,7 @@ class DB2Statement implements IteratorAggregate, Statement
*
* @var int[]
*/
static
private
$
_
typeMap
=
[
static
private
$typeMap
=
[
ParameterType
::
INTEGER
=>
DB2_LONG
,
ParameterType
::
STRING
=>
DB2_CHAR
,
];
...
...
@@ -76,7 +76,7 @@ class DB2Statement implements IteratorAggregate, Statement
*/
public
function
__construct
(
$stmt
)
{
$this
->
_
stmt
=
$stmt
;
$this
->
stmt
=
$stmt
;
}
/**
...
...
@@ -92,15 +92,15 @@ class DB2Statement implements IteratorAggregate, Statement
*/
public
function
bindParam
(
$column
,
&
$variable
,
$type
=
ParameterType
::
STRING
,
$length
=
null
)
{
$this
->
_
bindParam
[
$column
]
=&
$variable
;
$this
->
bindParam
[
$column
]
=&
$variable
;
if
(
$type
&&
isset
(
self
::
$
_
typeMap
[
$type
]))
{
$type
=
self
::
$
_
typeMap
[
$type
];
if
(
$type
&&
isset
(
self
::
$typeMap
[
$type
]))
{
$type
=
self
::
$typeMap
[
$type
];
}
else
{
$type
=
DB2_CHAR
;
}
if
(
!
db2_bind_param
(
$this
->
_
stmt
,
$column
,
'variable'
,
DB2_PARAM_IN
,
$type
))
{
if
(
!
db2_bind_param
(
$this
->
stmt
,
$column
,
'variable'
,
DB2_PARAM_IN
,
$type
))
{
throw
new
DB2Exception
(
db2_stmt_errormsg
());
}
...
...
@@ -112,13 +112,13 @@ class DB2Statement implements IteratorAggregate, Statement
*/
public
function
closeCursor
()
{
if
(
!
$this
->
_
stmt
)
{
if
(
!
$this
->
stmt
)
{
return
false
;
}
$this
->
_
bindParam
=
[];
$this
->
bindParam
=
[];
if
(
!
db2_free_result
(
$this
->
_
stmt
))
{
if
(
!
db2_free_result
(
$this
->
stmt
))
{
return
false
;
}
...
...
@@ -132,11 +132,11 @@ class DB2Statement implements IteratorAggregate, Statement
*/
public
function
columnCount
()
{
if
(
!
$this
->
_
stmt
)
{
if
(
!
$this
->
stmt
)
{
return
false
;
}
return
db2_num_fields
(
$this
->
_
stmt
);
return
db2_num_fields
(
$this
->
stmt
);
}
/**
...
...
@@ -163,21 +163,21 @@ class DB2Statement implements IteratorAggregate, Statement
*/
public
function
execute
(
$params
=
null
)
{
if
(
!
$this
->
_
stmt
)
{
if
(
!
$this
->
stmt
)
{
return
false
;
}
if
(
$params
===
null
)
{
ksort
(
$this
->
_
bindParam
);
ksort
(
$this
->
bindParam
);
$params
=
[];
foreach
(
$this
->
_
bindParam
as
$column
=>
$value
)
{
foreach
(
$this
->
bindParam
as
$column
=>
$value
)
{
$params
[]
=
$value
;
}
}
$retval
=
db2_execute
(
$this
->
_
stmt
,
$params
);
$retval
=
db2_execute
(
$this
->
stmt
,
$params
);
if
(
$retval
===
false
)
{
throw
new
DB2Exception
(
db2_stmt_errormsg
());
...
...
@@ -193,7 +193,7 @@ class DB2Statement implements IteratorAggregate, Statement
*/
public
function
setFetchMode
(
$fetchMode
,
$arg2
=
null
,
$arg3
=
null
)
{
$this
->
_defaultFetchMode
=
$fetchMode
;
$this
->
defaultFetchMode
=
$fetchMode
;
$this
->
defaultFetchClass
=
$arg2
?:
$this
->
defaultFetchClass
;
$this
->
defaultFetchClassCtorArgs
=
$arg3
?
(
array
)
$arg3
:
$this
->
defaultFetchClassCtorArgs
;
...
...
@@ -219,16 +219,16 @@ class DB2Statement implements IteratorAggregate, Statement
return
false
;
}
$fetchMode
=
$fetchMode
?:
$this
->
_
defaultFetchMode
;
$fetchMode
=
$fetchMode
?:
$this
->
defaultFetchMode
;
switch
(
$fetchMode
)
{
case
FetchMode
::
COLUMN
:
return
$this
->
fetchColumn
();
case
FetchMode
::
MIXED
:
return
db2_fetch_both
(
$this
->
_
stmt
);
return
db2_fetch_both
(
$this
->
stmt
);
case
FetchMode
::
ASSOCIATIVE
:
return
db2_fetch_assoc
(
$this
->
_
stmt
);
return
db2_fetch_assoc
(
$this
->
stmt
);
case
FetchMode
::
CUSTOM_OBJECT
:
$className
=
$this
->
defaultFetchClass
;
...
...
@@ -240,7 +240,7 @@ class DB2Statement implements IteratorAggregate, Statement
$ctorArgs
=
$args
[
2
]
??
[];
}
$result
=
db2_fetch_object
(
$this
->
_
stmt
);
$result
=
db2_fetch_object
(
$this
->
stmt
);
if
(
$result
instanceof
stdClass
)
{
$result
=
$this
->
castObject
(
$result
,
$className
,
$ctorArgs
);
...
...
@@ -249,10 +249,10 @@ class DB2Statement implements IteratorAggregate, Statement
return
$result
;
case
FetchMode
::
NUMERIC
:
return
db2_fetch_array
(
$this
->
_
stmt
);
return
db2_fetch_array
(
$this
->
stmt
);
case
FetchMode
::
STANDARD_OBJECT
:
return
db2_fetch_object
(
$this
->
_
stmt
);
return
db2_fetch_object
(
$this
->
stmt
);
default
:
throw
new
DB2Exception
(
'Given Fetch-Style '
.
$fetchMode
.
' is not supported.'
);
...
...
@@ -305,7 +305,7 @@ class DB2Statement implements IteratorAggregate, Statement
*/
public
function
rowCount
()
{
return
@
db2_num_rows
(
$this
->
_
stmt
)
?
:
0
;
return
@
db2_num_rows
(
$this
->
stmt
)
?
:
0
;
}
/**
...
...
lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
View file @
1cbadb3e
...
...
@@ -35,7 +35,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
public
const
OPTION_FLAGS
=
'flags'
;
/** @var mysqli */
private
$
_
conn
;
private
$conn
;
/**
* @param mixed[] $params
...
...
@@ -59,7 +59,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
$flags
=
$driverOptions
[
static
::
OPTION_FLAGS
]
??
null
;
$this
->
_
conn
=
mysqli_init
();
$this
->
conn
=
mysqli_init
();
$this
->
setSecureConnection
(
$params
);
$this
->
setDriverOptions
(
$driverOptions
);
...
...
@@ -67,8 +67,8 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
set_error_handler
(
static
function
()
{
});
try
{
if
(
!
$this
->
_
conn
->
real_connect
(
$params
[
'host'
],
$username
,
$password
,
$dbname
,
$port
,
$socket
,
$flags
))
{
throw
new
MysqliException
(
$this
->
_conn
->
connect_error
,
$this
->
_conn
->
sqlstate
??
'HY000'
,
$this
->
_
conn
->
connect_errno
);
if
(
!
$this
->
conn
->
real_connect
(
$params
[
'host'
],
$username
,
$password
,
$dbname
,
$port
,
$socket
,
$flags
))
{
throw
new
MysqliException
(
$this
->
conn
->
connect_error
,
$this
->
conn
->
sqlstate
??
'HY000'
,
$this
->
conn
->
connect_errno
);
}
}
finally
{
restore_error_handler
();
...
...
@@ -78,7 +78,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
return
;
}
$this
->
_
conn
->
set_charset
(
$params
[
'charset'
]);
$this
->
conn
->
set_charset
(
$params
[
'charset'
]);
}
/**
...
...
@@ -90,7 +90,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
getWrappedResourceHandle
()
{
return
$this
->
_
conn
;
return
$this
->
conn
;
}
/**
...
...
@@ -103,14 +103,14 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
getServerVersion
()
{
$serverInfos
=
$this
->
_
conn
->
get_server_info
();
$serverInfos
=
$this
->
conn
->
get_server_info
();
if
(
stripos
(
$serverInfos
,
'mariadb'
)
!==
false
)
{
return
$serverInfos
;
}
$majorVersion
=
floor
(
$this
->
_
conn
->
server_version
/
10000
);
$minorVersion
=
floor
((
$this
->
_
conn
->
server_version
-
$majorVersion
*
10000
)
/
100
);
$patchVersion
=
floor
(
$this
->
_
conn
->
server_version
-
$majorVersion
*
10000
-
$minorVersion
*
100
);
$majorVersion
=
floor
(
$this
->
conn
->
server_version
/
10000
);
$minorVersion
=
floor
((
$this
->
conn
->
server_version
-
$majorVersion
*
10000
)
/
100
);
$patchVersion
=
floor
(
$this
->
conn
->
server_version
-
$majorVersion
*
10000
-
$minorVersion
*
100
);
return
$majorVersion
.
'.'
.
$minorVersion
.
'.'
.
$patchVersion
;
}
...
...
@@ -128,7 +128,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
prepare
(
$prepareString
)
{
return
new
MysqliStatement
(
$this
->
_
conn
,
$prepareString
);
return
new
MysqliStatement
(
$this
->
conn
,
$prepareString
);
}
/**
...
...
@@ -149,7 +149,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
quote
(
$input
,
$type
=
ParameterType
::
STRING
)
{
return
"'"
.
$this
->
_
conn
->
escape_string
(
$input
)
.
"'"
;
return
"'"
.
$this
->
conn
->
escape_string
(
$input
)
.
"'"
;
}
/**
...
...
@@ -157,11 +157,11 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
exec
(
$statement
)
{
if
(
$this
->
_
conn
->
query
(
$statement
)
===
false
)
{
throw
new
MysqliException
(
$this
->
_conn
->
error
,
$this
->
_conn
->
sqlstate
,
$this
->
_
conn
->
errno
);
if
(
$this
->
conn
->
query
(
$statement
)
===
false
)
{
throw
new
MysqliException
(
$this
->
conn
->
error
,
$this
->
conn
->
sqlstate
,
$this
->
conn
->
errno
);
}
return
$this
->
_
conn
->
affected_rows
;
return
$this
->
conn
->
affected_rows
;
}
/**
...
...
@@ -169,7 +169,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
lastInsertId
(
$name
=
null
)
{
return
$this
->
_
conn
->
insert_id
;
return
$this
->
conn
->
insert_id
;
}
/**
...
...
@@ -177,7 +177,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
beginTransaction
()
{
$this
->
_
conn
->
query
(
'START TRANSACTION'
);
$this
->
conn
->
query
(
'START TRANSACTION'
);
return
true
;
}
...
...
@@ -187,7 +187,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
commit
()
{
return
$this
->
_
conn
->
commit
();
return
$this
->
conn
->
commit
();
}
/**
...
...
@@ -195,7 +195,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
rollBack
()
{
return
$this
->
_
conn
->
rollback
();
return
$this
->
conn
->
rollback
();
}
/**
...
...
@@ -203,7 +203,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
errorCode
()
{
return
$this
->
_
conn
->
errno
;
return
$this
->
conn
->
errno
;
}
/**
...
...
@@ -211,7 +211,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
errorInfo
()
{
return
$this
->
_
conn
->
error
;
return
$this
->
conn
->
error
;
}
/**
...
...
@@ -249,17 +249,17 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
);
}
if
(
@
mysqli_options
(
$this
->
_
conn
,
$option
,
$value
))
{
if
(
@
mysqli_options
(
$this
->
conn
,
$option
,
$value
))
{
continue
;
}
$msg
=
sprintf
(
$exceptionMsg
,
'Failed to set'
,
$option
,
$value
);
$msg
.=
sprintf
(
', error: %s (%d)'
,
mysqli_error
(
$this
->
_conn
),
mysqli_errno
(
$this
->
_
conn
));
$msg
.=
sprintf
(
', error: %s (%d)'
,
mysqli_error
(
$this
->
conn
),
mysqli_errno
(
$this
->
conn
));
throw
new
MysqliException
(
$msg
,
$this
->
_
conn
->
sqlstate
,
$this
->
_
conn
->
errno
$this
->
conn
->
sqlstate
,
$this
->
conn
->
errno
);
}
}
...
...
@@ -271,7 +271,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public
function
ping
()
{
return
$this
->
_
conn
->
ping
();
return
$this
->
conn
->
ping
();
}
/**
...
...
@@ -292,7 +292,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
return
;
}
$this
->
_
conn
->
ssl_set
(
$this
->
conn
->
ssl_set
(
$params
[
'ssl_key'
]
??
null
,
$params
[
'ssl_cert'
]
??
null
,
$params
[
'ssl_ca'
]
??
null
,
...
...
lib/Doctrine/DBAL/Event/ConnectionEventArgs.php
View file @
1cbadb3e
...
...
@@ -16,11 +16,11 @@ use Doctrine\DBAL\Schema\AbstractSchemaManager;
class
ConnectionEventArgs
extends
EventArgs
{
/** @var Connection */
private
$
_
connection
;
private
$connection
;
public
function
__construct
(
Connection
$connection
)
{
$this
->
_
connection
=
$connection
;
$this
->
connection
=
$connection
;
}
/**
...
...
@@ -28,7 +28,7 @@ class ConnectionEventArgs extends EventArgs
*/
public
function
getConnection
()
{
return
$this
->
_
connection
;
return
$this
->
connection
;
}
/**
...
...
@@ -36,7 +36,7 @@ class ConnectionEventArgs extends EventArgs
*/
public
function
getDriver
()
{
return
$this
->
_
connection
->
getDriver
();
return
$this
->
connection
->
getDriver
();
}
/**
...
...
@@ -44,7 +44,7 @@ class ConnectionEventArgs extends EventArgs
*/
public
function
getDatabasePlatform
()
{
return
$this
->
_
connection
->
getDatabasePlatform
();
return
$this
->
connection
->
getDatabasePlatform
();
}
/**
...
...
@@ -52,6 +52,6 @@ class ConnectionEventArgs extends EventArgs
*/
public
function
getSchemaManager
()
{
return
$this
->
_
connection
->
getSchemaManager
();
return
$this
->
connection
->
getSchemaManager
();
}
}
lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
View file @
1cbadb3e
...
...
@@ -20,14 +20,14 @@ class MysqlSessionInit implements EventSubscriber
*
* @var string
*/
private
$
_
charset
;
private
$charset
;
/**
* The collation, or FALSE if no collation.
*
* @var string|bool
*/
private
$
_
collation
;
private
$collation
;
/**
* Configure Charset and Collation options of MySQL Client for each Connection.
...
...
@@ -37,8 +37,8 @@ class MysqlSessionInit implements EventSubscriber
*/
public
function
__construct
(
$charset
=
'utf8'
,
$collation
=
false
)
{
$this
->
_
charset
=
$charset
;
$this
->
_
collation
=
$collation
;
$this
->
charset
=
$charset
;
$this
->
collation
=
$collation
;
}
/**
...
...
@@ -46,8 +46,8 @@ class MysqlSessionInit implements EventSubscriber
*/
public
function
postConnect
(
ConnectionEventArgs
$args
)
{
$collation
=
$this
->
_collation
?
' COLLATE '
.
$this
->
_
collation
:
''
;
$args
->
getConnection
()
->
executeUpdate
(
'SET NAMES '
.
$this
->
_
charset
.
$collation
);
$collation
=
$this
->
collation
?
' COLLATE '
.
$this
->
collation
:
''
;
$args
->
getConnection
()
->
executeUpdate
(
'SET NAMES '
.
$this
->
charset
.
$collation
);
}
/**
...
...
lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php
View file @
1cbadb3e
...
...
@@ -16,22 +16,22 @@ use function is_array;
class
SchemaAlterTableAddColumnEventArgs
extends
SchemaEventArgs
{
/** @var Column */
private
$
_
column
;
private
$column
;
/** @var TableDiff */
private
$
_
tableDiff
;
private
$tableDiff
;
/** @var AbstractPlatform */
private
$
_
platform
;
private
$platform
;
/** @var string[] */
private
$
_
sql
=
[];
private
$sql
=
[];
public
function
__construct
(
Column
$column
,
TableDiff
$tableDiff
,
AbstractPlatform
$platform
)
{
$this
->
_
column
=
$column
;
$this
->
_
tableDiff
=
$tableDiff
;
$this
->
_
platform
=
$platform
;
$this
->
column
=
$column
;
$this
->
tableDiff
=
$tableDiff
;
$this
->
platform
=
$platform
;
}
/**
...
...
@@ -39,7 +39,7 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
*/
public
function
getColumn
()
{
return
$this
->
_
column
;
return
$this
->
column
;
}
/**
...
...
@@ -47,7 +47,7 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
*/
public
function
getTableDiff
()
{
return
$this
->
_
tableDiff
;
return
$this
->
tableDiff
;
}
/**
...
...
@@ -55,7 +55,7 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
*/
public
function
getPlatform
()
{
return
$this
->
_
platform
;
return
$this
->
platform
;
}
/**
...
...
@@ -66,9 +66,9 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
public
function
addSql
(
$sql
)
{
if
(
is_array
(
$sql
))
{
$this
->
_sql
=
array_merge
(
$this
->
_
sql
,
$sql
);
$this
->
sql
=
array_merge
(
$this
->
sql
,
$sql
);
}
else
{
$this
->
_
sql
[]
=
$sql
;
$this
->
sql
[]
=
$sql
;
}
return
$this
;
...
...
@@ -79,6 +79,6 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
*/
public
function
getSql
()
{
return
$this
->
_
sql
;
return
$this
->
sql
;
}
}
lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php
View file @
1cbadb3e
...
...
@@ -16,22 +16,22 @@ use function is_array;
class
SchemaAlterTableChangeColumnEventArgs
extends
SchemaEventArgs
{
/** @var ColumnDiff */
private
$
_
columnDiff
;
private
$columnDiff
;
/** @var TableDiff */
private
$
_
tableDiff
;
private
$tableDiff
;
/** @var AbstractPlatform */
private
$
_
platform
;
private
$platform
;
/** @var string[] */
private
$
_
sql
=
[];
private
$sql
=
[];
public
function
__construct
(
ColumnDiff
$columnDiff
,
TableDiff
$tableDiff
,
AbstractPlatform
$platform
)
{
$this
->
_
columnDiff
=
$columnDiff
;
$this
->
_
tableDiff
=
$tableDiff
;
$this
->
_
platform
=
$platform
;
$this
->
columnDiff
=
$columnDiff
;
$this
->
tableDiff
=
$tableDiff
;
$this
->
platform
=
$platform
;
}
/**
...
...
@@ -39,7 +39,7 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
*/
public
function
getColumnDiff
()
{
return
$this
->
_
columnDiff
;
return
$this
->
columnDiff
;
}
/**
...
...
@@ -47,7 +47,7 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
*/
public
function
getTableDiff
()
{
return
$this
->
_
tableDiff
;
return
$this
->
tableDiff
;
}
/**
...
...
@@ -55,7 +55,7 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
*/
public
function
getPlatform
()
{
return
$this
->
_
platform
;
return
$this
->
platform
;
}
/**
...
...
@@ -66,9 +66,9 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
public
function
addSql
(
$sql
)
{
if
(
is_array
(
$sql
))
{
$this
->
_sql
=
array_merge
(
$this
->
_
sql
,
$sql
);
$this
->
sql
=
array_merge
(
$this
->
sql
,
$sql
);
}
else
{
$this
->
_
sql
[]
=
$sql
;
$this
->
sql
[]
=
$sql
;
}
return
$this
;
...
...
@@ -79,6 +79,6 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
*/
public
function
getSql
()
{
return
$this
->
_
sql
;
return
$this
->
sql
;
}
}
lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php
View file @
1cbadb3e
...
...
@@ -15,18 +15,18 @@ use function is_array;
class
SchemaAlterTableEventArgs
extends
SchemaEventArgs
{
/** @var TableDiff */
private
$
_
tableDiff
;
private
$tableDiff
;
/** @var AbstractPlatform */
private
$
_
platform
;
private
$platform
;
/** @var string[] */
private
$
_
sql
=
[];
private
$sql
=
[];
public
function
__construct
(
TableDiff
$tableDiff
,
AbstractPlatform
$platform
)
{
$this
->
_
tableDiff
=
$tableDiff
;
$this
->
_
platform
=
$platform
;
$this
->
tableDiff
=
$tableDiff
;
$this
->
platform
=
$platform
;
}
/**
...
...
@@ -34,7 +34,7 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs
*/
public
function
getTableDiff
()
{
return
$this
->
_
tableDiff
;
return
$this
->
tableDiff
;
}
/**
...
...
@@ -42,7 +42,7 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs
*/
public
function
getPlatform
()
{
return
$this
->
_
platform
;
return
$this
->
platform
;
}
/**
...
...
@@ -53,9 +53,9 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs
public
function
addSql
(
$sql
)
{
if
(
is_array
(
$sql
))
{
$this
->
_sql
=
array_merge
(
$this
->
_
sql
,
$sql
);
$this
->
sql
=
array_merge
(
$this
->
sql
,
$sql
);
}
else
{
$this
->
_
sql
[]
=
$sql
;
$this
->
sql
[]
=
$sql
;
}
return
$this
;
...
...
@@ -66,6 +66,6 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs
*/
public
function
getSql
()
{
return
$this
->
_
sql
;
return
$this
->
sql
;
}
}
lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php
View file @
1cbadb3e
...
...
@@ -16,22 +16,22 @@ use function is_array;
class
SchemaAlterTableRemoveColumnEventArgs
extends
SchemaEventArgs
{
/** @var Column */
private
$
_
column
;
private
$column
;
/** @var TableDiff */
private
$
_
tableDiff
;
private
$tableDiff
;
/** @var AbstractPlatform */
private
$
_
platform
;
private
$platform
;
/** @var string[] */
private
$
_
sql
=
[];
private
$sql
=
[];
public
function
__construct
(
Column
$column
,
TableDiff
$tableDiff
,
AbstractPlatform
$platform
)
{
$this
->
_
column
=
$column
;
$this
->
_
tableDiff
=
$tableDiff
;
$this
->
_
platform
=
$platform
;
$this
->
column
=
$column
;
$this
->
tableDiff
=
$tableDiff
;
$this
->
platform
=
$platform
;
}
/**
...
...
@@ -39,7 +39,7 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
*/
public
function
getColumn
()
{
return
$this
->
_
column
;
return
$this
->
column
;
}
/**
...
...
@@ -47,7 +47,7 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
*/
public
function
getTableDiff
()
{
return
$this
->
_
tableDiff
;
return
$this
->
tableDiff
;
}
/**
...
...
@@ -55,7 +55,7 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
*/
public
function
getPlatform
()
{
return
$this
->
_
platform
;
return
$this
->
platform
;
}
/**
...
...
@@ -66,9 +66,9 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
public
function
addSql
(
$sql
)
{
if
(
is_array
(
$sql
))
{
$this
->
_sql
=
array_merge
(
$this
->
_
sql
,
$sql
);
$this
->
sql
=
array_merge
(
$this
->
sql
,
$sql
);
}
else
{
$this
->
_
sql
[]
=
$sql
;
$this
->
sql
[]
=
$sql
;
}
return
$this
;
...
...
@@ -79,6 +79,6 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
*/
public
function
getSql
()
{
return
$this
->
_
sql
;
return
$this
->
sql
;
}
}
lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php
View file @
1cbadb3e
...
...
@@ -16,29 +16,29 @@ use function is_array;
class
SchemaAlterTableRenameColumnEventArgs
extends
SchemaEventArgs
{
/** @var string */
private
$
_
oldColumnName
;
private
$oldColumnName
;
/** @var Column */
private
$
_
column
;
private
$column
;
/** @var TableDiff */
private
$
_
tableDiff
;
private
$tableDiff
;
/** @var AbstractPlatform */
private
$
_
platform
;
private
$platform
;
/** @var string[] */
private
$
_
sql
=
[];
private
$sql
=
[];
/**
* @param string $oldColumnName
*/
public
function
__construct
(
$oldColumnName
,
Column
$column
,
TableDiff
$tableDiff
,
AbstractPlatform
$platform
)
{
$this
->
_
oldColumnName
=
$oldColumnName
;
$this
->
_
column
=
$column
;
$this
->
_
tableDiff
=
$tableDiff
;
$this
->
_
platform
=
$platform
;
$this
->
oldColumnName
=
$oldColumnName
;
$this
->
column
=
$column
;
$this
->
tableDiff
=
$tableDiff
;
$this
->
platform
=
$platform
;
}
/**
...
...
@@ -46,7 +46,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
*/
public
function
getOldColumnName
()
{
return
$this
->
_
oldColumnName
;
return
$this
->
oldColumnName
;
}
/**
...
...
@@ -54,7 +54,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
*/
public
function
getColumn
()
{
return
$this
->
_
column
;
return
$this
->
column
;
}
/**
...
...
@@ -62,7 +62,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
*/
public
function
getTableDiff
()
{
return
$this
->
_
tableDiff
;
return
$this
->
tableDiff
;
}
/**
...
...
@@ -70,7 +70,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
*/
public
function
getPlatform
()
{
return
$this
->
_
platform
;
return
$this
->
platform
;
}
/**
...
...
@@ -81,9 +81,9 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
public
function
addSql
(
$sql
)
{
if
(
is_array
(
$sql
))
{
$this
->
_sql
=
array_merge
(
$this
->
_
sql
,
$sql
);
$this
->
sql
=
array_merge
(
$this
->
sql
,
$sql
);
}
else
{
$this
->
_
sql
[]
=
$sql
;
$this
->
sql
[]
=
$sql
;
}
return
$this
;
...
...
@@ -94,6 +94,6 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
*/
public
function
getSql
()
{
return
$this
->
_
sql
;
return
$this
->
sql
;
}
}
lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php
View file @
1cbadb3e
...
...
@@ -14,23 +14,23 @@ use Doctrine\DBAL\Schema\Column;
class
SchemaColumnDefinitionEventArgs
extends
SchemaEventArgs
{
/** @var Column|null */
private
$
_
column
=
null
;
private
$column
=
null
;
/**
* Raw column data as fetched from the database.
*
* @var mixed[]
*/
private
$
_
tableColumn
;
private
$tableColumn
;
/** @var string */
private
$
_
table
;
private
$table
;
/** @var string */
private
$
_
database
;
private
$database
;
/** @var Connection */
private
$
_
connection
;
private
$connection
;
/**
* @param mixed[] $tableColumn
...
...
@@ -39,10 +39,10 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/
public
function
__construct
(
array
$tableColumn
,
$table
,
$database
,
Connection
$connection
)
{
$this
->
_
tableColumn
=
$tableColumn
;
$this
->
_
table
=
$table
;
$this
->
_
database
=
$database
;
$this
->
_
connection
=
$connection
;
$this
->
tableColumn
=
$tableColumn
;
$this
->
table
=
$table
;
$this
->
database
=
$database
;
$this
->
connection
=
$connection
;
}
/**
...
...
@@ -53,7 +53,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/
public
function
setColumn
(
?
Column
$column
=
null
)
{
$this
->
_
column
=
$column
;
$this
->
column
=
$column
;
return
$this
;
}
...
...
@@ -63,7 +63,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/
public
function
getColumn
()
{
return
$this
->
_
column
;
return
$this
->
column
;
}
/**
...
...
@@ -71,7 +71,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/
public
function
getTableColumn
()
{
return
$this
->
_
tableColumn
;
return
$this
->
tableColumn
;
}
/**
...
...
@@ -79,7 +79,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/
public
function
getTable
()
{
return
$this
->
_
table
;
return
$this
->
table
;
}
/**
...
...
@@ -87,7 +87,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/
public
function
getDatabase
()
{
return
$this
->
_
database
;
return
$this
->
database
;
}
/**
...
...
@@ -95,7 +95,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/
public
function
getConnection
()
{
return
$this
->
_
connection
;
return
$this
->
connection
;
}
/**
...
...
@@ -103,6 +103,6 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/
public
function
getDatabasePlatform
()
{
return
$this
->
_
connection
->
getDatabasePlatform
();
return
$this
->
connection
->
getDatabasePlatform
();
}
}
lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php
View file @
1cbadb3e
...
...
@@ -16,22 +16,22 @@ use function is_array;
class
SchemaCreateTableColumnEventArgs
extends
SchemaEventArgs
{
/** @var Column */
private
$
_
column
;
private
$column
;
/** @var Table */
private
$
_
table
;
private
$table
;
/** @var AbstractPlatform */
private
$
_
platform
;
private
$platform
;
/** @var string[] */
private
$
_
sql
=
[];
private
$sql
=
[];
public
function
__construct
(
Column
$column
,
Table
$table
,
AbstractPlatform
$platform
)
{
$this
->
_
column
=
$column
;
$this
->
_
table
=
$table
;
$this
->
_
platform
=
$platform
;
$this
->
column
=
$column
;
$this
->
table
=
$table
;
$this
->
platform
=
$platform
;
}
/**
...
...
@@ -39,7 +39,7 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
*/
public
function
getColumn
()
{
return
$this
->
_
column
;
return
$this
->
column
;
}
/**
...
...
@@ -47,7 +47,7 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
*/
public
function
getTable
()
{
return
$this
->
_
table
;
return
$this
->
table
;
}
/**
...
...
@@ -55,7 +55,7 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
*/
public
function
getPlatform
()
{
return
$this
->
_
platform
;
return
$this
->
platform
;
}
/**
...
...
@@ -66,9 +66,9 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
public
function
addSql
(
$sql
)
{
if
(
is_array
(
$sql
))
{
$this
->
_sql
=
array_merge
(
$this
->
_
sql
,
$sql
);
$this
->
sql
=
array_merge
(
$this
->
sql
,
$sql
);
}
else
{
$this
->
_
sql
[]
=
$sql
;
$this
->
sql
[]
=
$sql
;
}
return
$this
;
...
...
@@ -79,6 +79,6 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
*/
public
function
getSql
()
{
return
$this
->
_
sql
;
return
$this
->
sql
;
}
}
lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php
View file @
1cbadb3e
...
...
@@ -16,19 +16,19 @@ use function is_array;
class
SchemaCreateTableEventArgs
extends
SchemaEventArgs
{
/** @var Table */
private
$
_
table
;
private
$table
;
/** @var Column[] */
private
$
_
columns
;
private
$columns
;
/** @var mixed[] */
private
$
_
options
;
private
$options
;
/** @var AbstractPlatform */
private
$
_
platform
;
private
$platform
;
/** @var string[] */
private
$
_
sql
=
[];
private
$sql
=
[];
/**
* @param Column[] $columns
...
...
@@ -36,10 +36,10 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/
public
function
__construct
(
Table
$table
,
array
$columns
,
array
$options
,
AbstractPlatform
$platform
)
{
$this
->
_
table
=
$table
;
$this
->
_
columns
=
$columns
;
$this
->
_
options
=
$options
;
$this
->
_
platform
=
$platform
;
$this
->
table
=
$table
;
$this
->
columns
=
$columns
;
$this
->
options
=
$options
;
$this
->
platform
=
$platform
;
}
/**
...
...
@@ -47,7 +47,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/
public
function
getTable
()
{
return
$this
->
_
table
;
return
$this
->
table
;
}
/**
...
...
@@ -55,7 +55,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/
public
function
getColumns
()
{
return
$this
->
_
columns
;
return
$this
->
columns
;
}
/**
...
...
@@ -63,7 +63,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/
public
function
getOptions
()
{
return
$this
->
_
options
;
return
$this
->
options
;
}
/**
...
...
@@ -71,7 +71,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/
public
function
getPlatform
()
{
return
$this
->
_
platform
;
return
$this
->
platform
;
}
/**
...
...
@@ -82,9 +82,9 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
public
function
addSql
(
$sql
)
{
if
(
is_array
(
$sql
))
{
$this
->
_sql
=
array_merge
(
$this
->
_
sql
,
$sql
);
$this
->
sql
=
array_merge
(
$this
->
sql
,
$sql
);
}
else
{
$this
->
_
sql
[]
=
$sql
;
$this
->
sql
[]
=
$sql
;
}
return
$this
;
...
...
@@ -95,6 +95,6 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/
public
function
getSql
()
{
return
$this
->
_
sql
;
return
$this
->
sql
;
}
}
lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php
View file @
1cbadb3e
...
...
@@ -15,13 +15,13 @@ use function is_string;
class
SchemaDropTableEventArgs
extends
SchemaEventArgs
{
/** @var string|Table */
private
$
_
table
;
private
$table
;
/** @var AbstractPlatform */
private
$
_
platform
;
private
$platform
;
/** @var string|null */
private
$
_
sql
=
null
;
private
$sql
=
null
;
/**
* @param string|Table $table
...
...
@@ -34,8 +34,8 @@ class SchemaDropTableEventArgs extends SchemaEventArgs
throw
new
InvalidArgumentException
(
'SchemaDropTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'
);
}
$this
->
_
table
=
$table
;
$this
->
_
platform
=
$platform
;
$this
->
table
=
$table
;
$this
->
platform
=
$platform
;
}
/**
...
...
@@ -43,7 +43,7 @@ class SchemaDropTableEventArgs extends SchemaEventArgs
*/
public
function
getTable
()
{
return
$this
->
_
table
;
return
$this
->
table
;
}
/**
...
...
@@ -51,7 +51,7 @@ class SchemaDropTableEventArgs extends SchemaEventArgs
*/
public
function
getPlatform
()
{
return
$this
->
_
platform
;
return
$this
->
platform
;
}
/**
...
...
@@ -61,7 +61,7 @@ class SchemaDropTableEventArgs extends SchemaEventArgs
*/
public
function
setSql
(
$sql
)
{
$this
->
_
sql
=
$sql
;
$this
->
sql
=
$sql
;
return
$this
;
}
...
...
@@ -71,6 +71,6 @@ class SchemaDropTableEventArgs extends SchemaEventArgs
*/
public
function
getSql
()
{
return
$this
->
_
sql
;
return
$this
->
sql
;
}
}
lib/Doctrine/DBAL/Event/SchemaEventArgs.php
View file @
1cbadb3e
...
...
@@ -12,14 +12,14 @@ use Doctrine\Common\EventArgs;
class
SchemaEventArgs
extends
EventArgs
{
/** @var bool */
private
$
_
preventDefault
=
false
;
private
$preventDefault
=
false
;
/**
* @return \Doctrine\DBAL\Event\SchemaEventArgs
*/
public
function
preventDefault
()
{
$this
->
_
preventDefault
=
true
;
$this
->
preventDefault
=
true
;
return
$this
;
}
...
...
@@ -29,6 +29,6 @@ class SchemaEventArgs extends EventArgs
*/
public
function
isDefaultPrevented
()
{
return
$this
->
_
preventDefault
;
return
$this
->
preventDefault
;
}
}
lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php
View file @
1cbadb3e
...
...
@@ -14,20 +14,20 @@ use Doctrine\DBAL\Schema\Index;
class
SchemaIndexDefinitionEventArgs
extends
SchemaEventArgs
{
/** @var Index|null */
private
$
_
index
=
null
;
private
$index
=
null
;
/**
* Raw index data as fetched from the database.
*
* @var mixed[]
*/
private
$
_
tableIndex
;
private
$tableIndex
;
/** @var string */
private
$
_
table
;
private
$table
;
/** @var Connection */
private
$
_
connection
;
private
$connection
;
/**
* @param mixed[] $tableIndex
...
...
@@ -35,9 +35,9 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/
public
function
__construct
(
array
$tableIndex
,
$table
,
Connection
$connection
)
{
$this
->
_
tableIndex
=
$tableIndex
;
$this
->
_
table
=
$table
;
$this
->
_
connection
=
$connection
;
$this
->
tableIndex
=
$tableIndex
;
$this
->
table
=
$table
;
$this
->
connection
=
$connection
;
}
/**
...
...
@@ -47,7 +47,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/
public
function
setIndex
(
?
Index
$index
=
null
)
{
$this
->
_
index
=
$index
;
$this
->
index
=
$index
;
return
$this
;
}
...
...
@@ -57,7 +57,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/
public
function
getIndex
()
{
return
$this
->
_
index
;
return
$this
->
index
;
}
/**
...
...
@@ -65,7 +65,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/
public
function
getTableIndex
()
{
return
$this
->
_
tableIndex
;
return
$this
->
tableIndex
;
}
/**
...
...
@@ -73,7 +73,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/
public
function
getTable
()
{
return
$this
->
_
table
;
return
$this
->
table
;
}
/**
...
...
@@ -81,7 +81,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/
public
function
getConnection
()
{
return
$this
->
_
connection
;
return
$this
->
connection
;
}
/**
...
...
@@ -89,6 +89,6 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/
public
function
getDatabasePlatform
()
{
return
$this
->
_
connection
->
getDatabasePlatform
();
return
$this
->
connection
->
getDatabasePlatform
();
}
}
lib/Doctrine/DBAL/Schema/View.php
View file @
1cbadb3e
...
...
@@ -10,7 +10,7 @@ namespace Doctrine\DBAL\Schema;
class
View
extends
AbstractAsset
{
/** @var string */
private
$
_
sql
;
private
$sql
;
/**
* @param string $name
...
...
@@ -19,7 +19,7 @@ class View extends AbstractAsset
public
function
__construct
(
$name
,
$sql
)
{
$this
->
_setName
(
$name
);
$this
->
_
sql
=
$sql
;
$this
->
sql
=
$sql
;
}
/**
...
...
@@ -27,6 +27,6 @@ class View extends AbstractAsset
*/
public
function
getSql
()
{
return
$this
->
_
sql
;
return
$this
->
sql
;
}
}
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