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