1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace Doctrine\DBAL\Query;
use Doctrine\DBAL\DBALException;
use function implode;
/**
* @psalm-immutable
*/
class QueryException extends DBALException
{
/**
* @param string $alias
* @param string[] $registeredAliases
*
* @return QueryException
*/
public static function unknownAlias($alias, $registeredAliases)
{
return new self("The given alias '" . $alias . "' is not part of " .
'any FROM or JOIN clause table. The currently registered ' .
'aliases are: ' . implode(', ', $registeredAliases) . '.');
}
/**
* @param string $alias
* @param string[] $registeredAliases
*
* @return QueryException
*/
public static function nonUniqueAlias($alias, $registeredAliases)
{
return new self("The given alias '" . $alias . "' is not unique " .
'in FROM and JOIN clause table. The currently registered ' .
'aliases are: ' . implode(', ', $registeredAliases) . '.');
}
}