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
935fbb55
Commit
935fbb55
authored
Sep 20, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed deprecated constants
parent
92d4bb22
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
46 deletions
+20
-46
Doctrine.php
Doctrine.php
+0
-22
Configurable.php
Doctrine/Configurable.php
+0
-9
Manager.php
Doctrine/Manager.php
+0
-2
Repository.php
Doctrine/Repository.php
+19
-2
ConfigurableTestCase.php
tests/ConfigurableTestCase.php
+1
-11
No files found.
Doctrine.php
View file @
935fbb55
...
...
@@ -117,14 +117,6 @@ final class Doctrine {
* batch size attribute
*/
const
ATTR_BATCH_SIZE
=
8
;
/**
* primary key columns attribute
*/
const
ATTR_PK_COLUMNS
=
9
;
/**
* primary key type attribute
*/
const
ATTR_PK_TYPE
=
10
;
/**
* locking attribute
*/
...
...
@@ -283,20 +275,6 @@ final class Doctrine {
* mode for pessimistic locking
*/
const
LOCK_PESSIMISTIC
=
1
;
/**
* PRIMARY KEY TYPE CONSTANTS
*/
/**
* auto-incremented/(sequence updated) primary key
*/
const
INCREMENT_KEY
=
0
;
/**
* unique key
*/
const
UNIQUE_KEY
=
1
;
/**
* constructor
*/
...
...
Doctrine/Configurable.php
View file @
935fbb55
...
...
@@ -76,15 +76,6 @@ abstract class Doctrine_Configurable {
case
Doctrine
::
ATTR_LISTENER
:
$this
->
setEventListener
(
$value
);
break
;
case
Doctrine
::
ATTR_PK_COLUMNS
:
if
(
!
is_array
(
$value
))
throw
new
Doctrine_Exception
(
"The value of Doctrine::ATTR_PK_COLUMNS attribute must be an array"
);
break
;
case
Doctrine
::
ATTR_PK_TYPE
:
if
(
$value
!=
Doctrine
::
INCREMENT_KEY
&&
$value
!=
Doctrine
::
UNIQUE_KEY
)
throw
new
Doctrine_Exception
(
"The value of Doctrine::ATTR_PK_TYPE attribute must be either Doctrine::INCREMENT_KEY or Doctrine::UNIQUE_KEY"
);
break
;
case
Doctrine
::
ATTR_LOCKMODE
:
if
(
$this
instanceof
Doctrine_Connection
)
{
if
(
$this
->
getTransaction
()
->
getState
()
!=
Doctrine_Connection_Transaction
::
STATE_OPEN
)
...
...
Doctrine/Manager.php
View file @
935fbb55
...
...
@@ -82,8 +82,6 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
Doctrine
::
ATTR_BATCH_SIZE
=>
5
,
Doctrine
::
ATTR_COLL_LIMIT
=>
5
,
Doctrine
::
ATTR_LISTENER
=>
new
Doctrine_EventListener_Empty
(),
Doctrine
::
ATTR_PK_COLUMNS
=>
array
(
"id"
),
Doctrine
::
ATTR_PK_TYPE
=>
Doctrine
::
INCREMENT_KEY
,
Doctrine
::
ATTR_LOCKMODE
=>
1
,
Doctrine
::
ATTR_VLD
=>
false
,
Doctrine
::
ATTR_CREATE_TABLES
=>
true
,
...
...
Doctrine/Repository.php
View file @
935fbb55
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
/**
* Doctrine_Repository
* each record is added into Doctrine_Repository at the same time they are created,
...
...
@@ -8,8 +27,6 @@
* @package Doctrine ORM
* @url www.phpdoctrine.com
* @license LGPL
* @version 1.0 alpha
*
*/
class
Doctrine_Repository
implements
Countable
,
IteratorAggregate
{
/**
...
...
tests/ConfigurableTestCase.php
View file @
935fbb55
...
...
@@ -25,12 +25,6 @@ class Doctrine_ConfigurableTestCase extends Doctrine_UnitTestCase {
$this
->
manager
->
setAttribute
(
Doctrine
::
ATTR_LISTENER
,
new
Doctrine_EventListener_Debugger
());
$this
->
assertTrue
(
$this
->
manager
->
getAttribute
(
Doctrine
::
ATTR_LISTENER
)
instanceof
Doctrine_EventListener_Debugger
);
$this
->
manager
->
setAttribute
(
Doctrine
::
ATTR_PK_COLUMNS
,
array
(
"id"
));
$this
->
assertEqual
(
$this
->
manager
->
getAttribute
(
Doctrine
::
ATTR_PK_COLUMNS
),
array
(
"id"
));
$this
->
manager
->
setAttribute
(
Doctrine
::
ATTR_PK_TYPE
,
Doctrine
::
INCREMENT_KEY
);
$this
->
assertEqual
(
$this
->
manager
->
getAttribute
(
Doctrine
::
ATTR_PK_TYPE
),
Doctrine
::
INCREMENT_KEY
);
$this
->
manager
->
setAttribute
(
Doctrine
::
ATTR_LOCKMODE
,
Doctrine
::
LOCK_PESSIMISTIC
);
$this
->
assertEqual
(
$this
->
manager
->
getAttribute
(
Doctrine
::
ATTR_LOCKMODE
),
Doctrine
::
LOCK_PESSIMISTIC
);
...
...
@@ -88,11 +82,7 @@ class Doctrine_ConfigurableTestCase extends Doctrine_UnitTestCase {
$this
->
assertTrue
(
$e
instanceof
Exception
);
$this
->
connection
->
commit
();
}
try
{
$this
->
manager
->
setAttribute
(
Doctrine
::
ATTR_PK_TYPE
,
-
12
);
}
catch
(
Exception
$e
)
{
$this
->
assertTrue
(
$e
instanceof
Exception
);
}
}
public
function
testGetAttributes
()
{
$this
->
assertTrue
(
is_array
(
$this
->
manager
->
getAttributes
()));
...
...
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