SQLParserUtilsException.php 750 Bytes
Newer Older
1 2 3 4
<?php

namespace Doctrine\DBAL;

5 6
use function sprintf;

7 8 9 10 11
/**
 * Doctrine\DBAL\ConnectionException
 */
class SQLParserUtilsException extends DBALException
{
Benjamin Morel's avatar
Benjamin Morel committed
12 13 14 15 16
    /**
     * @param string $paramName
     *
     * @return \Doctrine\DBAL\SQLParserUtilsException
     */
17 18 19 20 21
    public static function missingParam($paramName)
    {
        return new self(sprintf('Value for :%1$s not found in params array. Params array key should be "%1$s"', $paramName));
    }

Benjamin Morel's avatar
Benjamin Morel committed
22 23 24 25 26
    /**
     * @param string $typeName
     *
     * @return \Doctrine\DBAL\SQLParserUtilsException
     */
27 28 29 30 31
    public static function missingType($typeName)
    {
        return new self(sprintf('Value for :%1$s not found in types array. Types array key should be "%1$s"', $typeName));
    }
}