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
d495a33a
Commit
d495a33a
authored
Sep 12, 2008
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
93b2cb0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
182 additions
and
0 deletions
+182
-0
EntityException.php
lib/Doctrine/ORM/Exceptions/EntityException.php
+65
-0
EntityManagerException.php
lib/Doctrine/ORM/Exceptions/EntityManagerException.php
+60
-0
ORMException.php
lib/Doctrine/ORM/Exceptions/ORMException.php
+57
-0
No files found.
lib/Doctrine/ORM/Exceptions/EntityException.php
0 → 100644
View file @
d495a33a
<?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.org>.
*/
#namespace Doctrine::ORM::Exceptions;
/**
* Doctrine_Entity_Exception
*
* @package Doctrine
* @subpackage Entity
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Roman Borschel <roman@code-factory.org>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @since 2.0
* @version $Revision$
*/
class
Doctrine_ORM_Exceptions_EntityException
extends
Doctrine_ORM_Exceptions_ORMException
{
public
static
function
unknownField
(
$field
)
{
return
new
self
(
"Undefined field: '
$field
'."
);
}
public
static
function
invalidValueForOneToManyReference
()
{
return
new
self
(
"Invalid value. The value of a reference in a OneToMany "
.
"association must be a Collection."
);
}
public
static
function
invalidValueForOneToOneReference
()
{
return
new
self
(
"Invalid value. The value of a reference in a OneToOne "
.
"association must be an Entity."
);
}
public
static
function
invalidValueForManyToManyReference
()
{
return
new
self
(
"Invalid value. The value of a reference in a ManyToMany "
.
"association must be a Collection."
);
}
public
static
function
invalidField
(
$field
)
{
return
new
self
(
"Invalid field: '
$field
'."
);
}
}
\ No newline at end of file
lib/Doctrine/ORM/Exceptions/EntityManagerException.php
0 → 100644
View file @
d495a33a
<?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.org>.
*/
#namespace Doctrine::ORM::Exceptions;
/**
* Doctrine_EntityManager_Exception
*
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Roman Borschel <roman@code-factory.org>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @since 2.0
* @version $Revision$
*/
class
Doctrine_ORM_Exceptions_EntityManagerException
extends
Doctrine_ORM_Exceptions_ORMException
{
public
static
function
invalidFlushMode
()
{
return
new
self
(
"Invalid flush mode."
);
}
public
static
function
noEntityManagerAvailable
()
{
return
new
self
(
"No EntityManager available."
);
}
public
static
function
entityAlreadyBound
(
$entityName
)
{
return
new
self
(
"The entity '
$entityName
' is already bound."
);
}
public
static
function
noManagerWithName
(
$emName
)
{
return
new
self
(
"EntityManager named '
$emName
' not found."
);
}
public
static
function
unknownAttribute
(
$name
)
{
return
new
self
(
"Unknown EntityManager attribute '
$name
'."
);
}
}
\ No newline at end of file
lib/Doctrine/ORM/Exceptions/ORMException.php
0 → 100644
View file @
d495a33a
<?php
/*
* $Id: Exception.php 4776 2008-08-16 19:40:59Z romanb $
*
* 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.org>.
*/
#namespace Doctrine::ORM::Exceptions;
/**
* Doctrine_Exception
*
* @package Doctrine
* @subpackage Exception
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @since 1.0
* @version $Revision: 4776 $
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Roman Borschel <roman@code-factory.org>
* @todo Rename to DoctrineException
*/
class
Doctrine_ORM_Exceptions_ORMException
extends
Exception
{
private
$_innerException
;
public
function
__construct
(
$message
=
""
,
Exception
$innerException
=
null
)
{
parent
::
__construct
(
$message
);
$this
->
_innerException
=
$innerException
;
}
public
function
getInnerException
()
{
return
$this
->
_innerException
;
}
public
static
function
notYetImplemented
(
$method
,
$class
)
{
return
new
self
(
"The method '
$method
' is not implemented in the class '
$class
'."
);
}
}
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