. */ namespace Doctrine\ORM; /** * Exception thrown when a Proxy fails to retrieve an Entity result. * * @author robo * @since 2.0 */ class EntityNotFoundException extends ORMException { /** * Constructor. */ public function __construct($class, array $id = array()) { $ids = array(); foreach ($id as $key => $value) { $ids[] = "{$key}({$value})"; } $idsFormatted = implode(', ', $ids); $message = "Entity of type '" . $class . "'" . ($idsFormatted ? ' for IDs ' . $idsFormatted : '') . ' was not found'; parent::__construct($message); } }