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
4d23c7bb
Commit
4d23c7bb
authored
Dec 13, 2013
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #373 from javer/hhvm-pdo-implement-interfaces
HHVM compatibility: implement declared interfaces
parents
f1970d63
e76001cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
121 additions
and
2 deletions
+121
-2
PDOConnection.php
lib/Doctrine/DBAL/Driver/PDOConnection.php
+47
-0
PDOStatement.php
lib/Doctrine/DBAL/Driver/PDOStatement.php
+74
-2
No files found.
lib/Doctrine/DBAL/Driver/PDOConnection.php
View file @
4d23c7bb
...
...
@@ -41,4 +41,51 @@ class PDOConnection extends PDO implements Connection
$this
->
setAttribute
(
PDO
::
ATTR_STATEMENT_CLASS
,
array
(
'Doctrine\DBAL\Driver\PDOStatement'
,
array
()));
$this
->
setAttribute
(
PDO
::
ATTR_ERRMODE
,
PDO
::
ERRMODE_EXCEPTION
);
}
/**
* {@inheritdoc}
*/
public
function
prepare
(
$prepareString
,
$driverOptions
=
array
())
{
return
parent
::
prepare
(
$prepareString
,
$driverOptions
);
}
/**
* {@inheritdoc}
*/
public
function
query
()
{
$args
=
func_get_args
();
$argsCount
=
count
(
$args
);
if
(
$argsCount
==
4
)
{
return
parent
::
query
(
$args
[
0
],
$args
[
1
],
$args
[
2
],
$args
[
3
]);
}
if
(
$argsCount
==
3
)
{
return
parent
::
query
(
$args
[
0
],
$args
[
1
],
$args
[
2
]);
}
if
(
$argsCount
==
2
)
{
return
parent
::
query
(
$args
[
0
],
$args
[
1
]);
}
return
parent
::
query
(
$args
[
0
]);
}
/**
* {@inheritdoc}
*/
public
function
quote
(
$input
,
$type
=
\PDO
::
PARAM_STR
)
{
return
parent
::
quote
(
$input
,
$type
);
}
/**
* {@inheritdoc}
*/
public
function
lastInsertId
(
$name
=
null
)
{
return
parent
::
lastInsertId
(
$name
);
}
}
lib/Doctrine/DBAL/Driver/PDOStatement.php
View file @
4d23c7bb
...
...
@@ -28,9 +28,9 @@ namespace Doctrine\DBAL\Driver;
class
PDOStatement
extends
\PDOStatement
implements
Statement
{
/**
* Pr
ivate
constructor.
* Pr
otected
constructor.
*/
pr
ivate
function
__construct
()
pr
otected
function
__construct
()
{
}
...
...
@@ -53,4 +53,76 @@ class PDOStatement extends \PDOStatement implements Statement
return
parent
::
setFetchMode
(
$fetchMode
,
$arg2
,
$arg3
);
}
/**
* {@inheritdoc}
*/
public
function
bindValue
(
$param
,
$value
,
$type
=
\PDO
::
PARAM_STR
)
{
return
parent
::
bindValue
(
$param
,
$value
,
$type
);
}
/**
* {@inheritdoc}
*/
public
function
bindParam
(
$column
,
&
$variable
,
$type
=
\PDO
::
PARAM_STR
,
$length
=
null
,
$driverOptions
=
array
())
{
return
parent
::
bindParam
(
$column
,
$variable
,
$type
,
$length
,
$driverOptions
);
}
/**
* {@inheritdoc}
*/
public
function
execute
(
$params
=
null
)
{
return
parent
::
execute
(
$params
);
}
/**
* {@inheritdoc}
*/
public
function
fetch
(
$fetchMode
=
null
,
$cursorOrientation
=
null
,
$cursorOffset
=
null
)
{
if
(
$fetchMode
===
null
&&
$cursorOrientation
===
null
&&
$cursorOffset
===
null
)
{
return
parent
::
fetch
();
}
if
(
$cursorOrientation
===
null
&&
$cursorOffset
===
null
)
{
return
parent
::
fetch
(
$fetchMode
);
}
if
(
$cursorOffset
===
null
)
{
return
parent
::
fetch
(
$fetchMode
,
$cursorOrientation
);
}
return
parent
::
fetch
(
$fetchMode
,
$cursorOrientation
,
$cursorOffset
);
}
/**
* {@inheritdoc}
*/
public
function
fetchAll
(
$fetchMode
=
null
,
$fetchArgument
=
null
,
$ctorArgs
=
null
)
{
if
(
$fetchMode
===
null
&&
$fetchArgument
===
null
&&
$ctorArgs
===
null
)
{
return
parent
::
fetchAll
();
}
if
(
$fetchArgument
===
null
&&
$ctorArgs
===
null
)
{
return
parent
::
fetchAll
(
$fetchMode
);
}
if
(
$ctorArgs
===
null
)
{
return
parent
::
fetchAll
(
$fetchMode
,
$fetchArgument
);
}
return
parent
::
fetchAll
(
$fetchMode
,
$fetchArgument
,
$ctorArgs
);
}
/**
* {@inheritdoc}
*/
public
function
fetchColumn
(
$columnIndex
=
0
)
{
return
parent
::
fetchColumn
(
$columnIndex
);
}
}
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