ParagonIE\EasyDB\EasyDB::setAttribute PHP Method

setAttribute() public method

Set an attribute
public setAttribute ( integer $attr, mixed $value ) : boolean
$attr integer
$value mixed
return boolean
    public function setAttribute(int $attr, $value) : bool
    {
        if ($attr === \PDO::ATTR_EMULATE_PREPARES) {
            throw new \Exception('EasyDB does not allow the use of emulated prepared statements, which would be a security downgrade.');
        }
        if ($attr === \PDO::ATTR_ERRMODE) {
            throw new \Exception('EasyDB only allows the safest-by-default error mode (exceptions).');
        }
        return $this->pdo->setAttribute($attr, $value);
    }